select * from student where (gnum, cnum) = any(select gnum, num from class where charge in ('','Xc')) order by gnum, cnum, num ;