Difference between revisions of "AVG()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=AVG()=
 
 
 
==Class==
 
SQL Applications
 
 
 
 
==Purpose==
 
==Purpose==
 
Returns an average value in a SELECT statement
 
Returns an average value in a SELECT statement
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
[[SQL SELECT|SELECT]], [[COUNT()]], [[MAX()]], [[MIN()]], [[SUM()]], [[SQL Aggregate Functions|AGGREGATES]]
+
[[SQL Aggregate Functions|AGGREGATES]], [[COUNT()]], [[MAX()]], [[MIN()]], [[SQL SELECT|SELECT]], [[SUM()]]  
  
  
Line 24: Line 17:
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
SELECT AVG(sal) Average FROM accounts;
+
SELECT AVG(sal) Average FROM accounts
 
</code>
 
</code>
  
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:SQL]]
 
[[Category:SQL]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 17:14, 22 December 2009

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


Products

Recital Server, Recital