范文无忧网面试笔试笔试回答

S2 SQL测试题

02月16日 编辑 fanwen51.com

第一题给你做完了. select f.mname, f.语文, f.数学, f.英语, f.历史 from (select MName , 语文=sum(case when then score end), 数学=sum(case when then score end), 英语=sum(case when then score end), 历史=sum(case when then score end) from dbo.Member inner join dbo.score on dbo.Member.MID=dbo.score.MID group by MName ) f where f.数学 is not null and f.语文 is not null and f.英语 is not null and f.历史 is not null 第二题 select MName , 语文=sum(case when then score end), 数学=sum(case when then score end), 英语=sum(case when then score end), 历史=sum(case when then score end) from dbo.Member inner join dbo.score on dbo.Member.MID=dbo.score.MID where score

推荐阅读
图文推荐
栏目列表