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