Complete the code to select only employees from the 'Sales' department.
SELECT * FROM employees WHERE department = [1];The WHERE clause filters rows to include only those where the department is 'Sales'.
Complete the code to find products with a price greater than 100.
SELECT product_name FROM products WHERE price [1] 100;
< instead of >.= which only finds prices exactly 100.The > operator filters products priced above 100.
Fix the error in the code to select customers from 'USA'.
SELECT * FROM customers WHERE country = [1];String values in SQL must be enclosed in single quotes ' '. Double quotes or no quotes cause errors.
Fill both blanks to select orders with quantity less than 10 and status 'pending'.
SELECT * FROM orders WHERE quantity [1] 10 AND status = [2];
The query filters orders where quantity is less than 10 and status is 'pending'.
Fill all three blanks to select employees whose age is greater than 30 and department is 'HR'.
SELECT name, age, department FROM employees WHERE age [1] 30 AND department = [2] ORDER BY [3];
The query filters employees older than 30 in the HR department and orders results by age.