select sName, GPA, sID
from Student S1
where not exists (select sName from Student S2 where S2.GPA > S1.GPA)
Say the above query. How does the following line work?
(select sName from Student S2 where S2.GPA > S1.GPA)
Is a new table that is the cross product or S1 and S2 created and the GPA compared then returned? I don't understand how S2 can be compared to S1 when S1 is not part of the subquery.