表名demo
ID date
1 2017-10-07
2 2017-10-07
3 2017-10-07
4 2017-10-08
5 2017-10-09
6 2017-10-09
7 2017-10-09
8 2017-10-09
9 2017-10-09
10 2017-10-09
查询2017-10-07到2017-10-09之间,每天都有多少条数据
表名demo
ID date
1 2017-10-07
2 2017-10-07
3 2017-10-07
4 2017-10-08
5 2017-10-09
6 2017-10-09
7 2017-10-09
8 2017-10-09
9 2017-10-09
10 2017-10-09
查询2017-10-07到2017-10-09之间,每天都有多少条数据
select count(*) from demo where date<=2017-10-07 and date>=2017-10-09 group by date