这是我的基本mysql查询,用于计算每日用户数,所以我需要从2012-01-30到2012-02-19执行,而不是手动修改,有什么好的方法吗?
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';
...