select * from class c where not exists( select * from student where (gnum, cnum) = (c.gnum, c.num) and score < 50 ) order by gnum, num ;