sql - mysql: getting a count of all the data, daily, for the last 365 days -


every day, table in mysql db(db.table1) gets data written it. gets anywhere between 9000 30000 rows per day. has been happening daily last 3 years. there way (perhaps kind of count(*) command) count of how many rows have been written db every day last 365 days.

edit: have firstcreated date looks this(2011-08-02 15:01:21) every entry

it this:

> 2012-01-01 | 3998  > 2012-01-02 | 8798  > 2012-01-03 | 12000  > 2012-01-04 | 398  > 2012-01-05 | 2876   until 

2012-12-31 | 5788

thanks much!

select count(*) totalrows, date_formate("%y-%m-%d",firstcreated) firstdate      table_name            date_formate("%y-%m-%d",firstcreated) in ("2012-01-01" , "2012-12-31")           group firstcreated; 

use above query.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -