select 日期,isnull(count(case when 成绩='胜' then 1 end),0)胜
,isnull(sum(case when 成绩='负' then 1 end),0)负 from score group by 日期 order by 日期
select [日期],sum(case where [成绩]='胜' then 1 end),sum(case where [成绩]='负' then 1 end) from [表] group by 日期
楼上的case是SQL SERVER的语句,那我就写句oracle的吧,楼主加油啊,我们公司这种SQL是基础的,笔试要比这个难不少,努力吧
select sum(decode(成绩,'胜','1','0')) as 胜,sum(decode(成绩,'负,'1','0')) as 负 from socre group by 日期 order by 日期