Marketing wants one mailing list combining the newsletter_subscribers and webinar_attendees tables, each with an email column. A person who appears in both tables must receive only one email. Which statement builds the list?
Select an answer to reveal the explanation.
Short Explanation
UNION is the bouncer who checks for duplicates at the door; UNION ALL just waves everybody through. When you need each person exactly once, you want UNION. And don't mix it up with INTERSECT or EXCEPT, which give you only the overlap or only the leftovers.
Full Explanation
Set operators combine the results of two queries with compatible column lists. UNION returns every distinct row that appears in either input, removing duplicates, so an email present in both tables appears once in the mailing list and every subscriber and attendee is included. UNION ALL also returns rows from both inputs but keeps duplicates, so anyone in both tables would be listed twice and receive two emails, which violates the requirement. INTERSECT returns only rows that appear in both inputs, which would mail only people who are both subscribers and attendees and drop everyone else. EXCEPT returns rows from the first query that do not appear in the second, so it would mail newsletter subscribers who never attended a webinar and omit all webinar attendees. Exam caveat: UNION's duplicate removal typically requires a sort or hash step, so UNION ALL is faster and is the right choice when duplicates are impossible or wanted; also, duplicates are judged by exact value, so differences in letter case or trailing spaces in email addresses would survive UNION unless the values are normalized first, for example with LOWER and TRIM. Operational check: count rows from each table and from the UNION result, then confirm the UNION count equals the sum of both tables minus the number of emails found by INTERSECT.