Joins I — semantics
Exercise · SQL & Querying

Predict, then run it

Predict the output

students(sid) = 1,2,3. assign(student_id) = 1, NULL (the NULL is a waitlist marker). List students never assigned to a boat, the NULL-safe way:

SELECT sid FROM students s WHERE NOT EXISTS (SELECT 1 FROM assign a WHERE a.student_id = s.sid) ORDER BY sid;

Predict the exact output.