student表(class,name,score)
soft061 a1 85
soft061 a2 90
soft061 a3 85
soft062 b1 90
soft062 b2 58
soft062 b3 57
soft063 c1 84
soft063 c2 98
soft063 c3 78
要求获得每班成绩最低的那个人的名字
soft061 a1 85
soft061 a2 90
soft061 a3 85
soft062 b1 90
soft062 b2 58
soft062 b3 57
soft063 c1 84
soft063 c2 98
soft063 c3 78
要求获得每班成绩最低的那个人的名字
from(
select class,min(score) minscore from student group by class
)a, student b
where a.class=b.class and a.minscore=b.score
(select class,name,score,rank()over(partition by class order by score) rk
from student)
where rk=1
)
Where NUM = 1