求大神帮忙解答 谢谢
展开全部
一、
select name from
(select name,sum(score>=60) as sum from stuscore GROUP BY name) as t1
where sum=3;
二、
select subject as '课程',sum(score>0 and score<60) as '不及格(0-59)个',
sum(score>=60 and score<=80) as '良(60-80)个',
sum(score>=81 and score<=100) as '优(81-100)个'
from stuscore group by subject;
三、
select t1.stuid as '学号',t1.name as '姓名',
语文,数学,英语,
(语文+数学+英语) as '总分',
(语文+数学+英语)/3 as '平均分' from
((select stuid,name,score as '语文' from stuscore where subject='语文') as t1
JOIN
(select stuid,name,score as '数学' from stuscore where subject='数学') as t2
JOIN
(select stuid,name,score as '英语' from stuscore where subject='英语') as t3
on t1.stuid=t2.stuid=t3.stuid)
select name from
(select name,sum(score>=60) as sum from stuscore GROUP BY name) as t1
where sum=3;
二、
select subject as '课程',sum(score>0 and score<60) as '不及格(0-59)个',
sum(score>=60 and score<=80) as '良(60-80)个',
sum(score>=81 and score<=100) as '优(81-100)个'
from stuscore group by subject;
三、
select t1.stuid as '学号',t1.name as '姓名',
语文,数学,英语,
(语文+数学+英语) as '总分',
(语文+数学+英语)/3 as '平均分' from
((select stuid,name,score as '语文' from stuscore where subject='语文') as t1
JOIN
(select stuid,name,score as '数学' from stuscore where subject='数学') as t2
JOIN
(select stuid,name,score as '英语' from stuscore where subject='英语') as t3
on t1.stuid=t2.stuid=t3.stuid)
展开全部
这科你可能要GG!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你说吧什么事?
追问
....就是卷面上的题啊....
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
众鸟高飞尽,孤云独去闲.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询