Last updated 2 months ago
SQL Server
Azure Synapse Analytics
Some parts in the output code are omitted for clarity reasons.
Returns the sum of all the values, or only the DISTINCT values, in the expression. SUM can be used with numeric columns only. Null values are ignored. ().
Code:
Result:
No issues were found.
No related EWIs.
SUM ( [ ALL | DISTINCT ] expression )
SUM( [ DISTINCT ] <expr1> )
SELECT SUM(VACATIONHOURS) FROM HUMANRESOURCES.EMPLOYEE AS TOTALVACATIONHOURS;
TOTALVACATIONHOURS| ------------------+ 14678|