Aggregate Function Data Conversion
The table below shows the resulting data type for all aggregate functions based on the input data type (only numeric input types are listed). For aggregate functions that only accept numeric values as input, if a non-numeric value is passed to the function, it is implicitly converted to a numeric value automatically. For aggregate functions that accept non-numeric inputs, the data type of result will match the data type of the input value.