Complete the code to select all products with prices between 10 and 50.
SELECT * FROM products WHERE price [1] 10 AND 50;
The BETWEEN keyword is used to filter values within a range, inclusive of the boundary values.
Complete the code to find employees hired between 2010 and 2015.
SELECT name FROM employees WHERE hire_date [1] '2010-01-01' AND '2015-12-31';
BETWEEN is the correct keyword to filter dates within a range, including the start and end dates.
Fix the error in the query to select orders with amounts between 100 and 500.
SELECT * FROM orders WHERE amount [1] 100 AND 500;
The correct syntax uses BETWEEN followed by two values separated by AND.
Fill both blanks to select customers with age between 18 and 30.
SELECT * FROM customers WHERE age [1] 18 [2] 30;
The BETWEEN keyword must be followed by the lower bound, then AND, then the upper bound.
Fill all three blanks to select products with quantity between 5 and 20.
SELECT * FROM inventory WHERE quantity [1] [2] [3] 20;
The correct syntax is: quantity BETWEEN 5 AND 20. The blanks represent the keyword, lower bound, and connector respectively.