Complete the code to select common rows from two tables.
SELECT * FROM employees [1] SELECT * FROM managers;The INTERSECT keyword returns only the rows that appear in both queries.
Complete the code to find common product IDs from two tables.
SELECT product_id FROM sales_2023 [1] SELECT product_id FROM sales_2024;INTERSECT returns only product IDs that appear in both sales_2023 and sales_2024.
Fix the error in the query to get common customer emails from two tables.
SELECT email FROM customers_2022 [1] SELECT email FROM customers_2023;To get common emails, use INTERSECT. JOIN and WHERE are incorrect here.
Fill both blanks to select common employee IDs and order them ascending.
SELECT employee_id FROM dept_a [1] SELECT employee_id FROM dept_b ORDER BY employee_id [2];
Use INTERSECT to get common IDs and ASC to order ascending.
Fill all three blanks to select common product names and prices, filtering price above 100.
SELECT product_name, price FROM products_2022 [1] SELECT product_name, price FROM products_2023 WHERE price [2] 100 ORDER BY price [3];
INTERSECT finds common products, > filters prices above 100, and ASC orders prices ascending.
