Complete the code to select all rows where the status is NOT 'active'.
SELECT * FROM users WHERE status [1] 'active';
The != operator means NOT equal to, so it selects rows where status is not 'active'.
Complete the code to select all products where the category is NOT 'electronics'.
SELECT * FROM products WHERE NOT category [1] 'electronics';
The NOT operator negates the condition. So NOT category = 'electronics' means category is not 'electronics'.
Fix the error in the code to select all employees who are NOT in department 5.
SELECT * FROM employees WHERE NOT department_id [1] 5;
Using NOT department_id = 5 is correct. Using != after NOT causes double negation and is incorrect here.
Fill both blanks to select all orders where the status is NOT 'shipped' and the quantity is NOT 10.
SELECT * FROM orders WHERE NOT status [1] 'shipped' AND quantity [2] 10;
The NOT status = 'shipped' means status is not 'shipped'. The quantity != 10 means quantity is not 10.
Fill all three blanks to select all customers where the city is NOT 'Paris', the country is NOT 'France', and the age is NOT 30.
SELECT * FROM customers WHERE NOT city [1] 'Paris' AND NOT country [2] 'France' AND age [3] 30;
Use NOT city = 'Paris' and NOT country = 'France' to negate those equalities. For age, use != 30 to select ages not equal to 30.