AVG

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Computes the average (arithmetic mean) of all input values.

  • <expression>: An expression of any numerical type.
  • numeric with a scale of 6 for integer-type arguments and numeric arguments with a scale less than 6.
  • double precision for floating-point arguments.
  • Otherwise, returns the same as argument the type.

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 a default value for NULL results.

Get the average price of products.

Calculate the average salary by department.

Use COALESCE to handle NULL results.