Complete the code to select all rows where the age is greater than 30.
SELECT * FROM users WHERE age [1] 30;
The '>' operator filters rows where age is greater than 30.
Complete the code to filter users whose name starts with 'A'.
SELECT * FROM users WHERE name [1] 'A%';
The LIKE operator filters strings matching a pattern. 'A%' means names starting with 'A'.
Fix the error in the query to filter users with age not equal to 25.
SELECT * FROM users WHERE age [1] 25;
In PostgreSQL, '<>' means 'not equal'. '!=' also works but '<>' is standard SQL.
Fill both blanks to select users with age between 20 and 30 inclusive.
SELECT * FROM users WHERE age [1] 20 AND age [2] 30;
Use '>=' for age at least 20 and '<=' for age at most 30 to include both ends.
Fill all three blanks to select users whose name starts with 'J', age is greater than 25, and city is not 'London'.
SELECT * FROM users WHERE name [1] 'J%' AND age [2] 25 AND city [3] 'London';
Use LIKE for pattern matching name starting with 'J', '>' for age greater than 25, and '!=' for city not equal to 'London'.