AVG & SUM
--==========================================[AVG]===========================================================================
--AVG aggregate function selects the average value for certain table column.
--Avg---------
SELECT AVG(EmailPromotion) AS AvgEmailPromotion
FROM Person.Contact
--==========================================[SUM]===========================================================================
--SUM aggregate function allows selecting the total for a numeric column.
---Sum--------
SELECT SUM(EmailPromotion)
FROM Person.Contact
No comments:
Post a Comment