Returns the sum of the column specified in the expression. SUM can be used with numeric columns only.
Syntax:
SUM ( expression )
Example:
SELECT Size, SUM(Price), SUM(Cost)
FROM Merchandise.Product
WHERE Size IS NOT NULL
AND Price != 0.00
AND Name LIKE 'Tshirt%'
GROUP BY Size
ORDER BY Size
Comments
Please sign in to leave a comment.