Chama-se GROUP BY cláusula: SELECT keyword, date, COUNT(1) AS count FROM table GROUP BY keyword, date