SQLSQL
#40

UNION vs UNION ALL Performance and Set Semantics in SQL

Easy
Interview Question #40

Combine candidate applications from `domestic_applications` and `international_applications`. Explain when `UNION ALL` is preferred over `UNION`.

Input Table: domestic & international
2 rows preview
candidate_idemail
1amit@gmail.com
2john@gmail.com
Expected Output Structure2 rows
candidate_idemail
1amit@gmail.com
2john@gmail.com
Interview Context

Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.

SQLPostgreSQL 15
Ready to execute

Click "Run Query" or press Ctrl + Enter to test your query.

Output will be verified against the test dataset.

Chat with us