nerdexam
Snowflake

DAA-C01 · Question #125

When employing window functions versus table functions in Snowflake, how do they differ in their application and output?

The correct answer is D. Table functions process data within specified partitions or frames. There appears to be an error in this question's answer key. Option D states that table functions process data within partitions or frames - but that is actually the defining behavior of window functions, not table functions. The answer key has them swapped. Here's what's…

Data Modeling and Transformation

Question

When employing window functions versus table functions in Snowflake, how do they differ in their application and output?

Options

  • ATable functions return tables as their output
  • BWindow functions operate on entire datasets and generate tables as output
  • CWindow functions provide aggregate results and modify table structures directly
  • DTable functions process data within specified partitions or frames

How the community answered

(31 responses)
  • A
    3% (1)
  • B
    10% (3)
  • C
    13% (4)
  • D
    74% (23)

Explanation

There appears to be an error in this question's answer key. Option D states that table functions process data within partitions or frames - but that is actually the defining behavior of window functions, not table functions. The answer key has them swapped.

Here's what's actually correct:

  • A is TRUE about table functions: they do return tabular results (a set of rows), used via TABLE() or LATERAL in a FROM clause.
  • D is TRUE about window functions, not table functions: OVER (PARTITION BY ... ORDER BY ... ROWS BETWEEN ...) defines the partition/frame a window function operates on.
  • B is wrong because window functions don't generate tables as output - they add a computed column per row while preserving the original row count.
  • C is wrong because window functions never modify table structures; they're purely read-only computations in a SELECT.

Memory tip: Think "window = frame around rows" (partitions/frames) and "table function = returns a table". The word in each name tells you exactly what it does.

If this is from an official practice exam, I'd flag D as a likely typo - the correct answer describing table functions should be A.

Topics

#Window Functions#Table Functions#Data Transformation#SQL Analytics

Community Discussion

No community discussion yet for this question.

Full DAA-C01 Practice