SELECT leads.*, sites.NAME_SITE
FROM `leads` leads
LEFT JOIN `sites` sites ON sites.SOURCE_ID = leads.SOURCE_ID
WHERE
leads.PHONE != "9 (999) 999 99-99" AND
leads.NAME != "тест" AND
leads.SOURCE_ID IN (1,3,4,5,6,7,8,10,11,12,14,15) AND
`DATE_CREATE` BETWEEN "2020-06-01" AND "2020-06-30"
GROUP BY leads.PHONE ORDER BY DATE_CREATE DESC
SELECT COUNT(DISTINCT `leads`.`PHONE`)
FROM `leads`
LEFT JOIN `sites` ON `sites`.`SOURCE_ID` = `leads`.`SOURCE_ID`
WHERE `leads`.`PHONE` != '9 (999) 999 99-99'
AND `leads`.`NAME` != 'тест'
AND `leads`.`SOURCE_ID` IN (1,3,4,5,6,7,8,10,11,12,14,15)
AND `DATE_CREATE` BETWEEN '2020-06-01' AND '2020-06-30'