Query | Affected | Num. rows | Took (ms) | Actions |
---|
SELECT `County`.`county_name`, COUNT(*) as cnt, `County`.`id` FROM `pvers`.`pqmps` AS `Pqmp` LEFT JOIN `pvers`.`counties` AS `County` ON (`Pqmp`.`county_id` = `County`.`id`) WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY `County`.`county_name`, `County`.`id` HAVING COUNT(*) > 0 | 36 | 36 | 17 | maybe slow |
SELECT year(ifnull(created, created)) as year, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY year(ifnull(created, created)) HAVING COUNT(*) > 0 ORDER BY `year` ASC | 4 | 4 | 2 | maybe slow |
SELECT `Designation`.`name`, COUNT(*) as cnt, `Designation`.`id` FROM `pvers`.`pqmps` AS `Pqmp` LEFT JOIN `pvers`.`designations` AS `Designation` ON (`Pqmp`.`designation_id` = `Designation`.`id`) WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY `Designation`.`name`, `Designation`.`id` HAVING COUNT(*) > 0 | 14 | 14 | 2 | maybe slow |
SELECT `Pqmp`.`facility_name`, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY facility_name HAVING COUNT(*) > 0 ORDER BY COUNT(*) DESC | 94 | 94 | 2 | |
SELECT `Pqmp`.`product_formulation`, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY product_formulation HAVING COUNT(*) > 0 ORDER BY COUNT(*) DESC | 8 | 8 | 2 | maybe slow |
SELECT ((case
when medicinal_product = 1 then 'Medicinal Product'
when blood_products = 1 then 'Blood and blood products'
when herbal_product = 1 then 'Herbal product'
when medical_device = 1 then 'Medical device'
when product_vaccine = 1 then 'Vaccine'
when cosmeceuticals = 1 then 'Cosmeceuticals'
else 'Others'
end)) as category, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY ((case
when medicinal_product = 1 then 'Medicinal Product'
when blood_products = 1 then 'Blood and blood products'
when herbal_product = 1 then 'Herbal product'
when medical_device = 1 then 'Medical device'
when product_vaccine = 1 then 'Vaccine'
when cosmeceuticals = 1 then 'Cosmeceuticals'
else 'Others'
end)) HAVING COUNT(*) > 0 | 7 | 7 | 2 | maybe slow |
SELECT ((case
when colour_change = 1 then 'Colour change'
when separating = 1 then 'Separating'
when powdering = 1 then 'Powdering'
when caking = 1 then 'Caking'
when moulding = 1 then 'Moulding'
when odour_change = 1 then 'Odour change'
when mislabeling = 1 then 'Mislabeling'
when incomplete_pack = 1 then 'Incomplete pack'
when therapeutic_ineffectiveness = 1 then 'Therapeutic ineffectiveness'
when particulate_matter = 1 then 'Particulate matter'
else 'Others'
end)) as complaint, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY ((case
when colour_change = 1 then 'Colour change'
when separating = 1 then 'Separating'
when powdering = 1 then 'Powdering'
when caking = 1 then 'Caking'
when moulding = 1 then 'Moulding'
when odour_change = 1 then 'Odour change'
when mislabeling = 1 then 'Mislabeling'
when incomplete_pack = 1 then 'Incomplete pack'
when therapeutic_ineffectiveness = 1 then 'Therapeutic ineffectiveness'
when particulate_matter = 1 then 'Particulate matter'
else 'Others'
end)) HAVING COUNT(*) > 0 | 10 | 10 | 2 | maybe slow |
SELECT ((case
when packaging = 1 then 'Packaging'
when labelling = 1 then 'Labelling'
when sampling = 1 then 'Sampling'
when mechanism = 1 then 'Mechanism'
when electrical = 1 then 'Electrical'
when device_data = 1 then 'Data'
when software = 1 then 'Software'
when environmental = 1 then 'Environmental'
when failure_to_calibrate = 1 then 'Failure to calibrate'
when results = 1 then 'Results'
when readings = 1 then 'Readings'
else 'N/A'
end)) as device, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY ((case
when packaging = 1 then 'Packaging'
when labelling = 1 then 'Labelling'
when sampling = 1 then 'Sampling'
when mechanism = 1 then 'Mechanism'
when electrical = 1 then 'Electrical'
when device_data = 1 then 'Data'
when software = 1 then 'Software'
when environmental = 1 then 'Environmental'
when failure_to_calibrate = 1 then 'Failure to calibrate'
when results = 1 then 'Results'
when readings = 1 then 'Readings'
else 'N/A'
end)) HAVING COUNT(*) > 0 | 4 | 4 | 2 | maybe slow |
SELECT `Pqmp`.`brand_name`, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY brand_name HAVING COUNT(*) > 0 ORDER BY COUNT(*) DESC | 64 | 64 | 1 | |
SELECT `Pqmp`.`name_of_manufacturer`, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY name_of_manufacturer HAVING COUNT(*) > 0 ORDER BY COUNT(*) DESC | 57 | 57 | 1 | |
SELECT `Pqmp`.`supplier_name`, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY supplier_name HAVING COUNT(*) > 0 ORDER BY COUNT(*) DESC | 27 | 27 | 1 | |
SELECT `Pqmp`.`generic_name`, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY generic_name HAVING COUNT(*) > 0 ORDER BY COUNT(*) DESC | 55 | 55 | 2 | |
SELECT `Country`.`name`, COUNT(*) as cnt, `Country`.`id` FROM `pvers`.`pqmps` AS `Pqmp` LEFT JOIN `pvers`.`countries` AS `Country` ON (`Pqmp`.`country_id` = `Country`.`id`) WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY `Country`.`name`, `Country`.`id` HAVING COUNT(*) > 0 | 23 | 23 | 7 | maybe slow |
SELECT DATE_FORMAT(created, "%b %Y") as month, month(ifnull(created, created)) as salit, COUNT(*) as cnt FROM `pvers`.`pqmps` AS `Pqmp` WHERE `Pqmp`.`submitted` IN (1, 2) AND `Pqmp`.`copied` != 1 GROUP BY DATE_FORMAT(created, "%b %Y"), salit HAVING COUNT(*) > 0 ORDER BY `salit` ASC | 23 | 23 | 2 | maybe slow |
SELECT `County`.`id`, `County`.`county_name` FROM `pvers`.`counties` AS `County` WHERE 1 = 1 ORDER BY `County`.`county_name` ASC | 47 | 47 | 0 | |
SELECT `Country`.`id`, `Country`.`name` FROM `pvers`.`countries` AS `Country` WHERE 1 = 1 | 249 | 249 | 1 | |