5个回答
展开全部
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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
ZESTRON
2024-09-04 广告
2024-09-04 广告
表界面分析在材料科学及化学领域占据核心地位,它深入探索物质表面与界面的微观结构、化学组成及相互作用。通过电商平台射线光电子能谱(电商平台PS)、扫描电子显微镜(SEM)及原子力显微镜(AFM)等先进技术手段,我们Dr. O.K. Wack ...
点击进入详情页
本回答由ZESTRON提供
展开全部
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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询