SQL – Aggregations
Practice SQL aggregation interview questions covering GROUP BY, SUM, COUNT, AVG, and HAVING. Write queries and receive feedback on correctness and approach. Ideal for beginners preparing for SQL interview rounds. First 2 questions are free with full feedback.
- Level Junior
- Questions 12
Try any track free — first 2 questions include full AI feedback. Subscribe to finish the track and unlock everything. Type or speak your answer — the first 2 questions include scoring and detailed AI feedback.
Sample sql – aggregations interview questions
Preview 6 questions from this track in quiz order. In the full quiz you answer one at a time — type or speak — then get a score and feedback.
-
Write a query to count the number of orders per customer.
What a strong answer includes
GROUP BY customer and COUNT.
-
How do you find the total sales by product category?
What a strong answer includes
Joins if needed and SUM with GROUP BY.
-
Explain the difference between COUNT(*) and COUNT(column).
What a strong answer includes
COUNT(*) counts rows; COUNT(column) ignores nulls.
-
Write a query to find departments with more than 10 employees.
What a strong answer includes
GROUP BY and HAVING COUNT > 10.
-
How do you calculate the average order value?
What a strong answer includes
AVG or SUM/COUNT.
-
Write a query to get the highest salary in each department.
What a strong answer includes
MAX with GROUP BY.