SUM (expression)

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
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.