nerdexam
Snowflake

DAA-C01 · Question #80

When using Snowflake functions, how do scalar functions differ from aggregate functions?

The correct answer is C. Aggregate functions return single values. Aggregate functions collapse multiple rows into a single return value - SUM(), COUNT(), and AVG() are classic examples - making C correct. Scalar functions are the opposite: they operate on one row at a time and return one value per row (e.g., UPPER(), LENGTH(), ROUND()), so A…

Data Modeling and Transformation

Question

When using Snowflake functions, how do scalar functions differ from aggregate functions?

Options

  • AScalar functions operate on entire tables.
  • BAggregate functions modify table structures.
  • CAggregate functions return single values.
  • DScalar functions work on groups of rows.

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    6% (2)
  • C
    88% (30)
  • D
    3% (1)

Explanation

Aggregate functions collapse multiple rows into a single return value - SUM(), COUNT(), and AVG() are classic examples - making C correct. Scalar functions are the opposite: they operate on one row at a time and return one value per row (e.g., UPPER(), LENGTH(), ROUND()), so A and D are backwards - those descriptions actually describe aggregate behavior, not scalar. B is wrong because neither function type modifies table structure; DDL statements like ALTER TABLE do that.

Memory tip: Think "Scalar = Single row in, single value out" vs. "Aggregate = All rows in, one total out." The "agg" in aggregate hints at aggregating (gathering) many rows into one result.

Topics

#Scalar functions#Aggregate functions#SQL functions

Community Discussion

No community discussion yet for this question.

Full DAA-C01 Practice