sql成績最高學生學號
❶ SQL語句查詢每個學生的學號、姓名、平均成績、最高成績和最低成績
得說一下,涉及到的具體表的結構
❷ SQL查詢每門課程最高分學生的學號,課程號,成績
select t1.學號,t1.課程號內,t1.成績容
from table t1
where t1.成績 = (
select max(t2.成績)
from table t2
where t2.課程號 = t1.課程號
group by t2.課程號
)
❸ 用T-SQL列印出班裡總成績最高的學生的姓名和學號
select sno 學號,sname 姓名 from student where sno in(select top 1 sno from (select sno,sum(Score) maxScore from sc group by sno)) a order by maxScore desc)
❹ sql,查詢每門課程最高分的學生的學號,課程號,成績。再一張表裡
1、首先在打開的sql中,查看Market資料庫中供應商來自哪些州的哪些城市,如內下圖所示。
❺ 怎麼在SQL中查詢總分最高的學生的學號
select top 1 學號 from 成績表
group by 學號
order by sum(成績) desc
樓主說的with ties,我還不會呢,哈哈,學到一招
❻ SQL查詢資料庫中最高分學生的信息, 怎麼寫
t1 學生信息表
編號 姓名
t2 學生成績表
編號 課程編號 學生編號 成績版
t3 課程信權息表
編號 課程
select t1.* , t3.課程, t.成績
from t1 left join (select min(編號) 編號, 課程編號, max(成績) 成績
from t2 group by 課程編號) t on t1.編號 = t.學生編號
left join t3 on t2.課程編號 = t3.編號
❼ 急,如何在sql裡面顯示score表中的最高分的學生學號和課程號
1、首先在源打開的sql軟體中,在SC表中找到學了C2的學生學號。
❽ 用SQL語言查詢每門課程得最高分的學生學號,課程號,成績.查詢結果按課程號升序排列
--1
select*fromSCAwheregrade=(selectMAX(grade)fromSCBwhereA.Cno=B.Cno)
orderbyCno
--2
selectS.Sno,Sname,SUM(Grade)總分
fromSjoinSConS.Sno=SC.Sno
groupbyS.Sno,Sname
havingCOUNT(*)=(selectCOUNT(*)fromC)
--3
insertintoSC_C
selectC.Cno,Cname,AVG(Grade)
fromCjoinSConC.Cno=SC.Cno
groupbyC.Cno,Cname
❾ SQL資料庫:查詢課程號為「203402」的成績最高的前5名學生的學號及成績,結果按成績降序
--不明白自隨時問我
select SNO,成績 from (
select SNO,成績,row_number() over (order by 成績 desc)*1 bz from tbname where CNO='203402') aa where aa.bz<=5
order by 成績 desc