Exam 3: Filtering Techniques
Difficulty: Beginner+
Topics covered: IN, NOT IN, BETWEEN, LIKE, IS NULL
Each question shows the target output. Write a SQL query that produces exactly those columns and rows.
Question 1
Retrieve all columns from products in the 'Electronics' or 'Furniture' category. Use IN.
Question 2
Retrieve all columns from orders where total_amount is between 50 and 400 (inclusive).
Question 3
Retrieve all columns from customers whose name starts with the letter 'C'.
Question 4
Retrieve the name and city of customers whose city starts with 'N'.
Question 5
Retrieve the order_id, customer_id, and status of orders not placed by customers 1 or 2. Use NOT IN.
Question 6
Retrieve customer_id, name, and city for any customer whose city has not been recorded.