22,210
社区成员
发帖
与我相关
我的任务
分享
select GName,BName,StudentScore_ex_1_1.IDCode,SName,max(TopicID)TopicID,max(Score ) Score
from studentscore_ex_1_1,Grade,BClass,Student
where studentscore_ex_1_1.IDCode=Student.IDCode
and Student.Bcl_PKID=BClass.PKID
and Student.Gra_PKID=Grade.PKID
and examID=1 and CourseID=1
group by GName,BName,StudentScore_ex_1_1.IDCode,SName
select GName,Bname,IDCode,Sname,max(Topic..),max(Score)Score
from 你的结果集
group by GName,Bname,IDCode,Sname
如果没有什么特殊要求的话就用上面试试