Použijte SUM
funkce k součtu count
a použijte DATE_FORMAT
funkce seskupit pouze podle data.
SELECT DATE_FORMAT(detectDate, '%Y-%m-%d') AS detectDate
,infection
,SUM(`COUNT`) as `count`
FROM myTable
GROUP BY DATE_FORMAT(detectDate, '%Y-%m-%d'), infection