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 city FROM customers [1] SELECT city FROM suppliers;The UNION ALL keyword combines results from two queries and keeps all duplicates.
Fix the error in the code to correctly combine two SELECT queries.
SELECT id, name FROM products [1] SELECT id, name FROM inventory;To combine all rows including duplicates, use UNION ALL. JOIN is for combining columns, not rows.
Fill both blanks to combine two queries and order the results by name.
SELECT name FROM staff [1] SELECT name FROM contractors [2] name;
Use UNION to combine results without duplicates, then ORDER BY to sort by name.
Fill all three blanks to combine two queries, keep duplicates, and sort by city.
SELECT city FROM customers [1] SELECT city FROM vendors [2] city [3];
Use UNION ALL to keep duplicates, then ORDER BY city ASC to sort cities alphabetically.