DAA-C01 · Question #51
When manipulating data in Snowflake, what distinguishes aggregate functions from analytic functions?
The correct answer is C. Analytic functions operate on individual rows within a partition. Analytic (window) functions operate on a set of rows related to the current row - defined by a PARTITION BY or ORDER BY clause - while still returning a value for each individual row, making option C correct. Aggregate functions (A, B, D confusion) collapse multiple rows into a s
Question
When manipulating data in Snowflake, what distinguishes aggregate functions from analytic functions?
Options
- AAggregate functions handle distinct value sets only
- BAggregate functions work on entire datasets
- CAnalytic functions operate on individual rows within a partition
- DAnalytic functions return single calculated values
How the community answered
(56 responses)- A7% (4)
- B5% (3)
- C86% (48)
- D2% (1)
Explanation
Analytic (window) functions operate on a set of rows related to the current row - defined by a PARTITION BY or ORDER BY clause - while still returning a value for each individual row, making option C correct. Aggregate functions (A, B, D confusion) collapse multiple rows into a single summary value per group, such as SUM() or COUNT() in a GROUP BY query - they reduce rows, they don't preserve them. Option A is wrong because aggregate functions work on any value set, not just distinct ones. Option B is misleading: aggregate functions work on groups within a dataset, not necessarily the entire dataset as one unit. Option D describes aggregate behavior, not analytic - analytic functions return one value per row, not one value overall.
Memory tip: Think of analytic functions as giving each row its own "window" to look through at neighboring rows - the row stays in the result, but it gains context from its peers. Aggregate functions collapse the crowd; analytic functions inform each member of it.
Topics
Community Discussion
No community discussion yet for this question.