mysql - SQL Statement to get daily totals -


i'm storing data in table , want able display total data points per day on graph. first graph point might 7 monday, jan 1, 2013, , 3 tuesday, jan 2, 2013...etc.

i have full time/date stamps each of data points in table of sql type datetime.

my pseudo statement looks this, i'm concerned since i'm using datetime data type:

select      date(created_at) create_date     count(id) total     data_table group      create_date 

how can total data points per day, regardless of timestamp?

try this

select      date(created_at) create_date,     count(id) total     data_table group      date(created_at) 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -