ylliX - Online Advertising Network

delete records with inner select

Working with MySQL 5.7, and I have this query: SELECT COUNT(`email`) as ‘EMAIL COUNT’ , `email` ,`isp_group` , GROUP_CONCAT(`list_id`) AS ‘Lists’ FROM `table` WHERE `status` = ‘ACTIVE’ AND `last_sent_date` BETWEEN CURDATE() – INTERVAL 30 DAY AND CURDATE() GROUP BY `email`, `isp_group` HAVING COUNT(`email`) > 2 ORDER BY `EMAIL COUNT` DESC Basically this query returns records […]