PostgreSQL - Aggregate Functions and GROUP BY
How can you modify this query to exclude NULL product names from the JSON array?
SELECT region, JSON_AGG(product) FROM sales GROUP BY region;
SELECT region, JSON_AGG(product) FROM sales GROUP BY region;
JSON_AGG, use the FILTER (WHERE ...) clause.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions