目前有如下的表 t_student
name project score
A 语文 90
A 数学 80
A 英语 20
A 生物 50
B 语文 34
B 数学 44
B 英语 55
B 生物 76
找出每个学生最差的两门课程求教啊
name project score
A 语文 90
A 数学 80
A 英语 20
A 生物 50
B 语文 34
B 数学 44
B 英语 55
B 生物 76
找出每个学生最差的两门课程求教啊
FROM t_student t2 )
select t1.name, t1.project, t1.score
from t_studnet t1
where exists ( select 1 from a1
where a1.name=t1.name
and a1.project=t1.project
and a1.rn<=2 );