Complete the code to combine results from two tables without duplicates.
SELECT name FROM employees [1] SELECT name FROM managers;The UNION keyword combines results from two queries and removes duplicates.
Complete the code to combine all rows from two tables including duplicates.
SELECT product_id FROM sales_2023 [1] SELECT product_id FROM sales_2024;The UNION ALL keyword combines all rows from both queries including duplicates.
Fix the error in the query to combine customer names from two tables.
SELECT customer_name FROM customers [1] ALL SELECT customer_name FROM clients;The correct syntax is UNION ALL without any word between UNION and ALL.
Fill both blanks to combine two queries and order the results by id.
SELECT id FROM table1 [1] SELECT id FROM table2 ORDER BY [2];
Use UNION to combine without duplicates and order by id.
Fill all three blanks to combine two queries selecting user and score, keeping duplicates, and order by score descending.
SELECT user, score FROM scores_2022 [1] SELECT user, score FROM scores_2023 ORDER BY [2] [3];
Use UNION ALL to keep duplicates, order by score in descending order.