PostgreSQL - Subqueries in PostgreSQL
Consider the query:
What does this query return?
SELECT t.user_id, t.total_orders FROM (SELECT user_id, COUNT(*) AS total_orders FROM orders GROUP BY user_id) AS t WHERE t.total_orders < 5;
What does this query return?
