GK Question

technology medium mcq

Which SQL aggregate function returns the number of rows matching a condition?

  1. SUM
  2. AVG
  3. COUNT
  4. MAX

Answer: COUNT

COUNT() returns the number of rows that match a specified condition. COUNT(*) counts all rows; COUNT(column) counts non-NULL values. Used with GROUP BY for segmented counts. Other aggregates: SUM (total), AVG (mean), MIN/MAX (extremes). Essential for reporting and analytics queries.

Topic Database & Programming
Exam Relevance Banking, SSC JE, Railway