select c.班级编号,c.学生编号,d.学生姓名,c.成绩 from c, (select * from a,b where a.主键 = b.班级主键) d where c.班级编号 = d.班级编号 and c.学生编号 = d.学生编号 order by c.班级编号,c.学生编号