PostgreSQL - Subqueries in PostgreSQL
Identify the error in this query:
SELECT u.id, o.amount FROM users u JOIN LATERAL (SELECT amount FROM orders WHERE user_id = u.id) o;