Complete the code to select employees with salaries between 3000 and 7000.
SELECT * FROM employees WHERE salary [1] 3000 AND 7000;
The BETWEEN keyword is used to filter values within a range, inclusive of the boundaries.
Complete the code to find products with prices between 10 and 50.
SELECT product_name FROM products WHERE price [1] 10 AND 50;
BETWEEN filters rows where the price is between 10 and 50 inclusive.
Fix the error in the code to correctly select orders with order_date between '2023-01-01' and '2023-01-31'.
SELECT * FROM orders WHERE order_date [1] '2023-01-01' AND '2023-01-31';
The BETWEEN keyword correctly filters dates within the specified range.
Fill both blanks to select customers with age between 18 and 30.
SELECT * FROM customers WHERE age [1] [2];
The BETWEEN keyword followed by the range 18 AND 30 filters ages inclusively.
Fill all three blanks to select orders with total_amount between 100 and 500.
SELECT order_id FROM orders WHERE total_amount [1] [2] [3];
The correct syntax is: total_amount BETWEEN 100 AND 500 to filter the range inclusively.