skip to Main Content

Mysql – how to optimize the slow query?

The below query is taking time to execute. does this have any rewrite possibilities? Query; SELECT t_product.a_productid, t_product.a_mpactive, t_product.a_active, trim( substring_index(a_reference, '_',-1)) as a_reference, t_product.a_shopid, t_productlang.a_name, t_deactivatedproduct.a_reason FROM t_deactivatedproduct inner join ( SELECT max(a_deactivatedproductid) as a_deactivatedproductid FROM t_deactivatedproduct GROUP by…

VIEW QUESTION

Please help me to fix the error – mysqlclient

pip install mysqlclient Collecting mysqlclient Using cached mysqlclient-2.1.1.tar.gz (88 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [16 lines of output] /bin/sh: 1: mysql_config: not found /bin/sh:…

VIEW QUESTION

Mysql – Allocation values from one row to another in SQL

I have the following table: CREATE TABLE table_one( person varchar(55), date_value date, proj varchar(2), value int, time varchar(2 ); INSERT INTO table_one VALUES ('A1',2020-10-01'W',10,'T1') ('A1',2020-10-01'A',5,'T2') ('A1',2020-10-01'P',6,'T3') ('A1',2020-10-01'A',9,'T4') ('A1',2020-10-01'P',11,'T5') ('A1',2020-10-01'A',4,'T6') ('A1',2020-10-01'P',2,'T7') ('A1',2020-10-01'A',1,'T8') ('A1',2020-10-01'P',10,'T9') ('A1',2020-10-01'A',8,'T10') I want an SQL query which creates…

VIEW QUESTION
Back To Top
Search