SUM

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Computes the sum of all input values.

  • <expression>: An expression of any numerical type.
  • bigint for integer-type arguments.
  • NUMERIC(38,s) for NUMERIC(p,s) arguments.

Returns NULL if no rows are selected.

  • NULL values are ignored in the calculation.
  • Returns NULL when applied to an empty set.
  • Use COALESCE to substitute zero for NULL if necessary.

Get the total revenue.

Calculate totals per group.

Use COALESCE to return zero for empty sets.