





Combining result sets is common in analytics work, such as merging customer lists from multiple American Express data sources or reporting surfaces. Interviewers ask this to check whether you understand both correctness and performance tradeoffs.
Explain the difference between UNION and UNION ALL in SQL. You should describe how each handles duplicate rows, what requirements the combined queries must satisfy, and when you would choose one over the other in an analytics workflow.
Keep your answer practical. A strong response should cover result-set behavior, performance implications, and a simple example of when deduplication is desirable versus when preserving all rows is the correct choice.
Combining result sets is common in analytics work, such as merging customer lists from multiple American Express data sources or reporting surfaces. Interviewers ask this to check whether you understand both correctness and performance tradeoffs.
Explain the difference between UNION and UNION ALL in SQL. You should describe how each handles duplicate rows, what requirements the combined queries must satisfy, and when you would choose one over the other in an analytics workflow.
Keep your answer practical. A strong response should cover result-set behavior, performance implications, and a simple example of when deduplication is desirable versus when preserving all rows is the correct choice.