Skip to content
SQLSimplified
Data AnalystQuestion 55 of 57

Combining Results with UNION

Problem

You are consolidating legacy data. You have a list of all current employee IDs, and a list of all former employee IDs, and need to combine them into one master list without duplicates. Write a query that outputs concept with the value: "UNION combines the result sets of two SELECT statements and removes duplicates, while UNION ALL keeps duplicates."

Database Schema

This problem acts as a scratchpad. You will write your own DDL/DML or conceptual queries, so there is no predefined schema.

Try It

Loading playground environment...

Hint

Solution