Complete the code to select rows where the value is equal to any element in the array.
SELECT * FROM products WHERE price = ANY([1]);The ANY operator works with arrays in PostgreSQL. The array must be specified using ARRAY[...] syntax.
Complete the code to select rows where the value is greater than all elements in the array.
SELECT * FROM orders WHERE quantity > ALL([1]);The ALL operator compares a value to all elements of an array. The array must be constructed with ARRAY[...].
Fix the error in the query to correctly check if the column value is less than any element in the array.
SELECT * FROM sales WHERE amount < ANY([1]);The ANY operator requires the array to be specified with the ARRAY keyword in PostgreSQL.
Fill both blanks to select rows where the score is greater than all elements in the array and less than any element in another array.
SELECT * FROM results WHERE score > ALL([1]) AND score < ANY([2]);
Both ALL and ANY require arrays constructed with ARRAY[...] syntax.
Fill all three blanks to select rows where age is less than all elements in one array, greater than any element in another array, and equal to any element in a third array.
SELECT * FROM users WHERE age < ALL([1]) AND age > ANY([2]) AND age = ANY([3]);
All arrays must use the ARRAY[...] syntax for ANY and ALL operators in PostgreSQL.