Here is my basic mysql query, it’s used to calculate the daily user numbers, so I need to execute this from 2012-01-30 till 2012-02-19, instead of modified it manually, is there any good method?
select count(distinct user) FROM video WHERE date >= '2012-01-30 00:00' AND date <= '2012-01-30 23:55';
select count(distinct user) FROM video WHERE date >= '2012-01-31 00:00' AND date <= '2012-01-31 23:55';
...
1 Answer