SELECT COUNT statistic_prolonged_ partition id AS requests FROM statis

1
SELECT COUNT(`statistic_prolonged_partition`.`id`) AS `requests` FROM `statistic_prolonged_partition` INNER JOIN `statistic_device` ON (`statistic_prolonged_partition`.`device_id` = `statistic_device`.`id`) WHERE ((`statistic_prolonged_partition`.`date_start` BETWEEN '2019-11-01 00:00:00' AND '2019-11-30 23:59:59' OR `statistic_prolonged_partition`.`date_end` BETWEEN '2019-11-01 00:00:00' AND '2019-11-30 23:59:59') AND `statistic_prolonged_partition`.`action` = 'OPEN_SECTION' AND `statistic_prolonged_partition`.`param` = 'iptv' AND `statistic_prolonged_partition`.`duration` BETWEEN 300000000 AND 43200000000 AND NOT (`statistic_device`.`player_id` IS NULL));