MySQL Count rows by date timestamp

From D3xt3r01.tk
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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`);