Query | Affected | Num. rows | Took (ms) | Actions |
---|
SELECT `County`.`county_name`, COUNT(*) as cnt, `County`.`id` FROM `pvers`.`devices` AS `Device` LEFT JOIN `pvers`.`counties` AS `County` ON (`Device`.`county_id` = `County`.`id`) WHERE `Device`.`submitted` IN (1, 2) AND `Device`.`copied` != 1 GROUP BY `County`.`county_name`, `County`.`id` HAVING COUNT(*) > 0 | 14 | 14 | 3 | maybe slow |
SELECT `County`.`id`, `County`.`county_name` FROM `pvers`.`counties` AS `County` WHERE 1 = 1 ORDER BY `County`.`county_name` ASC | 47 | 47 | 1 | |
SELECT `Device`.`gender`, COUNT(*) as cnt FROM `pvers`.`devices` AS `Device` WHERE `Device`.`submitted` IN (1, 2) AND `Device`.`copied` != 1 GROUP BY gender HAVING COUNT(*) > 0 | 2 | 2 | 1 | maybe slow |
SELECT ((case
when trim(age_years) in ('neonate', 'infant', 'child', 'adolescent', 'adult', 'elderly') then age_years
when year(now()) - right(date_of_birth, 4) between 0 and 1 then 'infant'
when year(now()) - right(date_of_birth, 4) between 1 and 10 then 'child'
when year(now()) - right(date_of_birth, 4) between 18 and 65 then 'adult'
when year(now()) - right(date_of_birth, 4) between 10 and 18 then 'adolescent'
when year(now()) - right(date_of_birth, 4) between 65 and 155 then 'elderly'
else 'unknown'
end)) as ager, COUNT(*) as cnt FROM `pvers`.`devices` AS `Device` WHERE `Device`.`submitted` IN (1, 2) AND `Device`.`copied` != 1 GROUP BY ((case
when trim(age_years) in ('neonate', 'infant', 'child', 'adolescent', 'adult', 'elderly') then age_years
when year(now()) - right(date_of_birth, 4) between 0 and 1 then 'infant'
when year(now()) - right(date_of_birth, 4) between 1 and 10 then 'child'
when year(now()) - right(date_of_birth, 4) between 18 and 65 then 'adult'
when year(now()) - right(date_of_birth, 4) between 10 and 18 then 'adolescent'
when year(now()) - right(date_of_birth, 4) between 65 and 155 then 'elderly'
else 'unknown'
end)) HAVING COUNT(*) > 0 | 5 | 5 | 2 | maybe slow |
SELECT year(ifnull(created, created)) as year, COUNT(*) as cnt FROM `pvers`.`devices` AS `Device` WHERE `Device`.`submitted` IN (1, 2) AND `Device`.`copied` != 1 GROUP BY year(ifnull(created, created)) HAVING COUNT(*) > 0 ORDER BY `year` ASC | 4 | 4 | 2 | maybe slow |
SELECT `Device`.`serious`, COUNT(*) as cnt FROM `pvers`.`devices` AS `Device` WHERE `Device`.`submitted` IN (1, 2) AND `Device`.`copied` != 1 GROUP BY `Device`.`serious` HAVING COUNT(*) > 0 | 5 | 5 | 1 | maybe slow |
SELECT `Device`.`serious_yes`, COUNT(*) as cnt FROM `pvers`.`devices` AS `Device` WHERE `submitted` IN (1, 2) GROUP BY serious_yes HAVING COUNT(*) > 0 | 4 | 4 | 0 | |
SELECT `ListOfDevice`.`brand_name` AS `brand_name`, COUNT(distinct ListOfDevice.device_id) as cnt FROM `pvers`.`list_of_devices` AS `ListOfDevice` WHERE `ListOfDevice`.`created` > '2020-04-01 08:08:08' GROUP BY `ListOfDevice`.`brand_name` HAVING COUNT(distinct `ListOfDevice`.`device_id`) > 0 | 5 | 5 | 4 | maybe slow |
SELECT `Device`.`outcome`, COUNT(*) as cnt FROM `pvers`.`devices` AS `Device` WHERE `Device`.`submitted` IN (1, 2) AND `Device`.`copied` != 1 GROUP BY outcome HAVING COUNT(*) > 0 | 4 | 4 | 1 | maybe slow |
SELECT `Device`.`name_of_institution`, COUNT(*) as cnt FROM `pvers`.`devices` AS `Device` WHERE `Device`.`submitted` IN (1, 2) AND `Device`.`copied` != 1 GROUP BY name_of_institution HAVING COUNT(*) > 0 ORDER BY COUNT(*) DESC | 15 | 15 | 1 | maybe slow |
SELECT DATE_FORMAT(created, "%b %Y") as month, month(ifnull(created, created)) as salit, COUNT(*) as cnt FROM `pvers`.`devices` AS `Device` WHERE `Device`.`submitted` IN (1, 2) AND `Device`.`copied` != 1 GROUP BY DATE_FORMAT(created, "%b %Y"), salit HAVING COUNT(*) > 0 ORDER BY `salit` ASC | 8 | 8 | 1 | maybe slow |
SELECT `Designation`.`name`, COUNT(*) as cnt, `Designation`.`id` FROM `pvers`.`devices` AS `Device` LEFT JOIN `pvers`.`designations` AS `Designation` ON (`Device`.`designation_id` = `Designation`.`id`) WHERE `Device`.`submitted` IN (1, 2) AND `Device`.`copied` != 1 GROUP BY `Designation`.`name`, `Designation`.`id` HAVING COUNT(*) > 0 | 10 | 10 | 1 | maybe slow |