4. Understanding the Elements of SQL Statements
:
SQL Functions
:
Aggregate Functions
:
Aggregate Functions and Decimal Data
Share this page
Aggregate Functions and Decimal Data
Given decimal arguments, aggregate functions (with the exception of COUNT) return decimal results.
The following table explains how to determine the scale and precision of results returned for aggregates with decimal arguments:
Function Name
Precision of Result
Scale of Result
COUNT
Not applicable
Not applicable
SUM
39
Same as argument
AVG
39
Scale of argument + 1 (to a maximum of 39)
MAX
Same as argument
Same as argument
MIN
Same as argument
Same as argument