Closed hemberger closed 1 year ago
Aggregate functions that return null on an empty set will instead return no result if the expression has a GROUP BY clause.
This currently affects the Avg, Sum, and MinMax return type extensions.
We also update Sum to always allow a null result without GROUP BY, as per https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_sum:
If there are no matching rows, or if expr is NULL, SUM() returns NULL.
Aggregate functions that return null on an empty set will instead return no result if the expression has a GROUP BY clause.
This currently affects the Avg, Sum, and MinMax return type extensions.
We also update Sum to always allow a null result without GROUP BY, as per https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_sum: