Multiple choice technology databases

Which one is single-row function

  1. STDDEV

  2. VARIANCE

  3. ROUND

  4. COUNT

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

ROUND operates on individual values, transforming each input row independently. In contrast, STDDEV, VARIANCE, and COUNT are aggregate functions that require processing multiple rows to compute statistical measures.

AI explanation

ROUND is a single-row (scalar) function — it operates on one row at a time and returns one result per row, e.g. ROUND(salary,2) evaluates independently for every row in the result set. STDDEV, VARIANCE, and COUNT are all group (aggregate) functions — they operate across a set of rows (optionally grouped by GROUP BY) and return one summary value per group, not per row. The distinguishing test is: does it need multiple rows to produce its result (aggregate) or does it transform each row's value independently (single-row)? ROUND clearly falls in the latter category.