1. Which of the following query patterns breaks the GROUP BY Golden Rule?
- SELECT brand, AVG(price) FROM products GROUP BY brand
- SELECT brand, product_name, AVG(price) FROM products GROUP BY brand
- SELECT brand, category_id, AVG(price) FROM products GROUP BY brand, category_id
- SELECT SUM(price) FROM products
Hint: The Golden Rule states: every non-aggregated column in the SELECT list must be present in the GROUP BY. 'product_name' is missing from the group list.