I'm trying to find the id of the customers whose income is greater than any customer who is 22 years old. I have come up with this query which seems correct to me, but it doesn't work in SQLite (I get 'near "SELECT": syntax error'). What is an equivalent query that would work in SQLite?
SELECT id
FROM Customers
WHERE income > ANY (
SELECT C.income
FROM Customers C
WHERE C.age = 22
)