MySQL Count rows by date timestamp

From D3xt3r01.tk
Jump to navigationJump to search

WHY

I wanted to see a history of how many rows were inserted in a table by date. In that table I have a timestamp type column.

QUERY

The `date` column is the one that has the timestamp type.

SELECT date(`date`), count(*) FROM `table` GROUP BY date(`date`);