Difference between revisions of "AVG()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision: SQL) |
Yvonne.milne (Talk | contribs) |
||
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]] |
Revision as of 11:12, 26 October 2011
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