MySQL Count rows by date timestamp: Difference between revisions
From D3xt3r01.tk
Jump to navigationJump to search
m (New page: ==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 tim...) |
(No difference)
|
Latest revision as of 02:39, 26 August 2009
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`);