Difference between revisions of "AVG()"
From Lianjapedia
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Returns an average value in a SELECT statement | Returns an average value in a SELECT statement | ||
− | |||
==Syntax== | ==Syntax== | ||
AVG(<expN>) | AVG(<expN>) | ||
− | |||
==See Also== | ==See Also== | ||
[[SQL Aggregate Functions|AGGREGATES]], [[COUNT()]], [[MAX()]], [[MIN()]], [[SQL SELECT|SELECT]], [[SUM()]] | [[SQL Aggregate Functions|AGGREGATES]], [[COUNT()]], [[MAX()]], [[MIN()]], [[SQL SELECT|SELECT]], [[SUM()]] | ||
− | |||
==Description== | ==Description== | ||
Returns the average value of <expN>. | Returns the average value of <expN>. | ||
− | |||
==Example== | ==Example== | ||
Line 20: | Line 16: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SQL]] | [[Category:SQL]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
+ | [[Category:SQL Functions]] |
Latest revision as of 03:33, 7 December 2012
Contents
Purpose
Returns an average value in a SELECT statement
Syntax
AVG(<expN>)
See Also
AGGREGATES, COUNT(), MAX(), MIN(), SELECT, SUM()
Description
Returns the average value of <expN>.
Example
SELECT AVG(sal) Average FROM accounts