像下面表里怎么查询出100和200在这个月里每天的sum总数?
id sum time
100 2 2016-4-16 19:02
100 32 2016-4-15 19:02
200 23 2016-4-14 19:02
100 32 2016-4-16 19:02
200 32 2016-4-16 19:02
200 123 2016-4-11 19:02
200 23 2016-4-16 19:02
100 32 2016-4-16 19:02
200 213 2016-4-16 19:02
100 32 2016-4-16 19:02
200 23 2016-4-16 19:02
100 32 2016-4-16 19:02
200 23 2016-4-16 19:02
100 32 2016-4-13 19:02
200 23 2016-4-16 19:02
100 32 2016-4-11 19:02
200 23 2016-4-12 19:02
id sum time
100 2 2016-4-16 19:02
100 32 2016-4-15 19:02
200 23 2016-4-14 19:02
100 32 2016-4-16 19:02
200 32 2016-4-16 19:02
200 123 2016-4-11 19:02
200 23 2016-4-16 19:02
100 32 2016-4-16 19:02
200 213 2016-4-16 19:02
100 32 2016-4-16 19:02
200 23 2016-4-16 19:02
100 32 2016-4-16 19:02
200 23 2016-4-16 19:02
100 32 2016-4-13 19:02
200 23 2016-4-16 19:02
100 32 2016-4-11 19:02
200 23 2016-4-12 19:02
解决方案
40
select id,date(time),sum(sum)
from 像下面表
group by id,date(time)
from 像下面表
group by id,date(time)