Aggregation & Grouping interview questions

18 Aggregation & Grouping questions from the SQL bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is GROUP BY?

Junior
  1. A.COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column
  2. B.groups rows sharing a value so aggregates are computed per group
  3. C.every selected non-aggregated column must also appear in the GROUP BY clause
  4. D.filters groups after aggregation, whereas WHERE filters rows before it

Answer + AI explanation with Pro

2. Which term means: "groups rows sharing a value so aggregates are computed per group"?

Junior
  1. A.COUNT / SUM / AVG
  2. B.GROUP BY column rule
  3. C.GROUP BY
  4. D.COUNT(*) vs COUNT(col)

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.GROUP BY — filters groups after aggregation, whereas WHERE filters rows before it
  2. B.GROUP BY — groups rows sharing a value so aggregates are computed per group
  3. C.GROUP BY — COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column
  4. D.GROUP BY — returns the first non-NULL value from its arguments

Answer + AI explanation with Pro

4. What is HAVING?

Mid
  1. A.groups rows sharing a value so aggregates are computed per group
  2. B.filters groups after aggregation, whereas WHERE filters rows before it
  3. C.aggregate functions returning row count, total, and mean over a group
  4. D.COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column

Answer + AI explanation with Pro

5. Which term means: "filters groups after aggregation, whereas WHERE filters rows before it"?

Mid
  1. A.COALESCE
  2. B.COUNT(*) vs COUNT(col)
  3. C.COUNT / SUM / AVG
  4. D.HAVING

Answer + AI explanation with Pro

6. Which statement is correct?

Mid
  1. A.HAVING — aggregate functions returning row count, total, and mean over a group
  2. B.HAVING — COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column
  3. C.HAVING — every selected non-aggregated column must also appear in the GROUP BY clause
  4. D.HAVING — filters groups after aggregation, whereas WHERE filters rows before it

Answer + AI explanation with Pro

7. What is COUNT / SUM / AVG?

Junior
  1. A.returns the first non-NULL value from its arguments
  2. B.aggregate functions returning row count, total, and mean over a group
  3. C.every selected non-aggregated column must also appear in the GROUP BY clause
  4. D.groups rows sharing a value so aggregates are computed per group

Answer + AI explanation with Pro

8. Which term means: "aggregate functions returning row count, total, and mean over a group"?

Junior
  1. A.GROUP BY column rule
  2. B.COUNT(*) vs COUNT(col)
  3. C.COUNT / SUM / AVG
  4. D.HAVING

Answer + AI explanation with Pro

9. Which statement is correct?

Junior
  1. A.COUNT / SUM / AVG — aggregate functions returning row count, total, and mean over a group
  2. B.COUNT / SUM / AVG — every selected non-aggregated column must also appear in the GROUP BY clause
  3. C.COUNT / SUM / AVG — returns the first non-NULL value from its arguments
  4. D.COUNT / SUM / AVG — COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column

Answer + AI explanation with Pro

10. What is GROUP BY column rule?

Mid
  1. A.aggregate functions returning row count, total, and mean over a group
  2. B.groups rows sharing a value so aggregates are computed per group
  3. C.COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column
  4. D.every selected non-aggregated column must also appear in the GROUP BY clause

Answer + AI explanation with Pro

11. Which term means: "every selected non-aggregated column must also appear in the GROUP BY clause"?

Mid
  1. A.COALESCE
  2. B.GROUP BY
  3. C.GROUP BY column rule
  4. D.COUNT(*) vs COUNT(col)

Answer + AI explanation with Pro

12. Which statement is correct?

Mid
  1. A.GROUP BY column rule — aggregate functions returning row count, total, and mean over a group
  2. B.GROUP BY column rule — COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column
  3. C.GROUP BY column rule — returns the first non-NULL value from its arguments
  4. D.GROUP BY column rule — every selected non-aggregated column must also appear in the GROUP BY clause

Answer + AI explanation with Pro

13. What is **COUNT(*) vs COUNT(col)**?

Mid
  1. A.aggregate functions returning row count, total, and mean over a group
  2. B.groups rows sharing a value so aggregates are computed per group
  3. C.COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column
  4. D.returns the first non-NULL value from its arguments

Answer + AI explanation with Pro

14. Which term means: "COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column"?

Mid
  1. A.COALESCE
  2. B.GROUP BY column rule
  3. C.HAVING
  4. D.COUNT(*) vs COUNT(col)

Answer + AI explanation with Pro

15. Which statement is correct?

Mid
  1. A.COUNT(*) vs COUNT(col) — returns the first non-NULL value from its arguments
  2. B.COUNT(*) vs COUNT(col) — COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column
  3. C.COUNT(*) vs COUNT(col) — every selected non-aggregated column must also appear in the GROUP BY clause
  4. D.COUNT(*) vs COUNT(col) — groups rows sharing a value so aggregates are computed per group

Answer + AI explanation with Pro

16. What is COALESCE?

Mid
  1. A.every selected non-aggregated column must also appear in the GROUP BY clause
  2. B.COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column
  3. C.groups rows sharing a value so aggregates are computed per group
  4. D.returns the first non-NULL value from its arguments

Answer + AI explanation with Pro

17. Which term means: "returns the first non-NULL value from its arguments"?

Mid
  1. A.COUNT / SUM / AVG
  2. B.GROUP BY
  3. C.GROUP BY column rule
  4. D.COALESCE

Answer + AI explanation with Pro

18. Which statement is correct?

Mid
  1. A.COALESCE — COUNT(*) counts all rows; COUNT(col) counts only non-NULL values of that column
  2. B.COALESCE — returns the first non-NULL value from its arguments
  3. C.COALESCE — groups rows sharing a value so aggregates are computed per group
  4. D.COALESCE — every selected non-aggregated column must also appear in the GROUP BY clause

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Aggregation & Grouping question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers