adwarm — 2013-11-11T07:28:04-05:00 — #1
I have a database which has new records added every day, on each record there is a time stamp called TimeStamp and has info like this:
I want a query which will count how many records there are for each day, so for example:
2013-11-11 = 102 records
2013-11-10 = 211 records
2013-11-09 = 163 records
I'm not sure how id do this but any help would be great.
guido2004 — 2013-11-11T07:44:30-05:00 — #2
Something with DATE(), COUNT() and GROUP BY
adwarm — 2013-11-11T08:17:24-05:00 — #3
Done it thanks
SELECT COUNT( * ) , DATE_FORMAT( `TimeStamp` , "%Y-%m-%d" ) AS Total_Leads
GROUP BY Total_Leads
system — 2014-10-08T01:09:24-04:00 — #4
This topic is now closed. New replies are no longer allowed.