DAA-C01 · Question #161
DAA-C01 Question #161: Real Exam Question with Answer & Explanation
The correct answer is A: Aggregate functions return single values.. A and C are correct because aggregate functions (like SUM, COUNT, AVG) collapse groups of rows into a single output row per group, which is precisely what happens when you use GROUP BY - they reduce and summarize data. B is wrong because window functions don't operate on the enti
Question
How do aggregate functions differ from window functions in Snowflake?
Options
- AAggregate functions return single values.
- BWindow functions work on entire tables.
- CAggregate functions operate on groups of rows.
- DWindow functions modify table structures.
Explanation
A and C are correct because aggregate functions (like SUM, COUNT, AVG) collapse groups of rows into a single output row per group, which is precisely what happens when you use GROUP BY - they reduce and summarize data.
B is wrong because window functions don't operate on the entire table indiscriminately; they operate on a defined partition (or "window") of rows specified by PARTITION BY/ORDER BY, and crucially, they return a value for every input row rather than collapsing them.
D is wrong because window functions (using the OVER() clause) are purely analytical - they never alter table structure or data; they only compute and return derived values alongside existing rows.
Memory tip: Think of it this way - aggregate functions are "crushers" (they crush many rows into one), while window functions are "annotators" (they add a computed column to each row without removing any rows). If your query still shows the same number of rows after the function runs, it's a window function.
Topics
Community Discussion
No community discussion yet for this question.