展开全部
select date,sum(case result when '轮消胜搜中' then 1 else 0) 胜,
sum(case result when '负世桐山' then 1 else 0) 负
group by date
sum(case result when '负世桐山' then 1 else 0) 负
group by date
追问
sql server2005不能运行,提示“)”处有错误~
追答
select date,sum(case result when '胜' then 1 else 0) as [胜],
sum(case result when '负' then 1 else 0) as [负]
group by date
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
select DATE,
count(case when result = '胜' then result end ) '胜'空樱,
count(case when result = '负' then result end) '空亏枝负'斗敏
from competition
group by date
count(case when result = '胜' then result end ) '胜'空樱,
count(case when result = '负' then result end) '空亏枝负'斗敏
from competition
group by date
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
select date,sum(case when result='胜'裂漏纤 then 1 else 0 end) as 胜肆仿搜此,sum(case when result='负' then 1 else 0 end) as 负
from Competition group by date
from Competition group by date
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
select date, sum(decode(result,'胜敏孝'闭顷,1,0)),sum(decode(result,'负轿拿陆',1,0))
from Competition group by date
from Competition group by date
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
select date,sum(case result when '纤贺胜孙皮' then 1 else 0 end) 胜,
sum(case result when '则竖差负' then 1 else 0 end) 负 from Competition
group by date
sum(case result when '则竖差负' then 1 else 0 end) 负 from Competition
group by date
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询