SELECT statistic_hit_partit ion param COUNT statistic_hit_partit ion i

1
SELECT `statistic_hit_partition`.`param`, COUNT(`statistic_hit_partition`.`id`) AS `requests`, COUNT(DISTINCT `statistic_hit_partition`.`device_id`) AS `devices` FROM `statistic_hit_partition` INNER JOIN `statistic_device` ON (`statistic_hit_partition`.`device_id` = `statistic_device`.`id`) WHERE (`statistic_hit_partition`.`action` = 'PLAY_VIDEO' AND `statistic_hit_partition`.`param` IN ('megogo', 'okko', 'youtube', 'ivi') AND `statistic_hit_partition`.`date` BETWEEN '2019-03-01 00:00:00' AND '2019-03-31 23:59:59' AND NOT (`statistic_device`.`player_id` IS NULL)) GROUP BY `statistic_hit_partition`.`param` ORDER BY `statistic_hit_partition`.`param` ASC