you know, every time somebody "sanitizes" their table and column names in order to pose what they think is a simple question, inevitably the solution that is given to them doesn't make sense with the made up names, and then they have to post the actual structure and ask for a second solution, which requires twice the amount of work than if they had just posted the original structure in the first place
<sigh />
it's exactly the same query, just the name have changed
except now i'm not as sure it will work for you, eh
Code:
select users.username
, exams.examname
from (
select distinct username
from examusername
) as users
cross
join exams
left outer
join examusername
on users.username = examusername.username
and exams.examname = examusername.examgiven
where examusername.examgiven is null
Bookmarks