show-notice
hide-notice

Tuesday, 6 August 2013

AVG() Function


Introduction:

The avg function in sql server provide the mathematical average of a series of values. In other words we can say that The AVG function calculates the arithmetic mean (the sum of non null values divided by the number of non null values) of a set of values contained in a numeric column (or attribute) in the result set of a query.
Syntax

 SELECT AVG(column_name) FROM table_name
Example:
 SELECT AVG(Price) AS PriceAverage FROM Products;

SHARE THIS POST   

0 comments :

Post a Comment

Design by Gohilinfotech | www.gohilinfotech.blogspot.com