Analysts often need to answer business questions like revenue by customer, orders by region, or average spend by product category. These problems usually require combining tables correctly and then aggregating the data at the right level.
Explain how you would write a SELECT statement with JOINs and GROUP BY to answer a business question. In your answer, describe:
SELECT versus GROUP BYCOUNT(), SUM(), and AVG() fit into the queryThe interviewer expects a practical explanation, not just definitions. You should be able to describe a clear approach, discuss trade-offs such as INNER JOIN vs LEFT JOIN, and use a simple business example to show how the query is built.