表结构
ingTime result
----------------------- ------
2010-10-09 00:00:00.000 胜
2010-10-09 00:00:00.000 胜
2010-10-09 00:00:00.000 负
2010-10-09 00:00:00.000 负
2010-10-10 00:00:00.000 胜
2010-10-10 00:00:00.000 胜
2010-10-10 00:00:00.000 负
我要统计成
ingTime result
----------------------- ------
2010-10-09 00:00:00.000 2
2010-10-09 00:00:00.000 2
2010-10-10 00:00:00.000 2
2010-10-10 00:00:00.000 1
------解决方案--------------------
select ingTime,result,count(*) from 表结构 group by ingTime,result