4D v14

AVG

Home

 
4D v14
AVG

AVG  


 

 

Command AVGAVG ([ALL | DISTINCT] arithmetic_expression)

The AVG function returns the average of the arithmetic_expression. The optional ALL and DISTINCT keywords are used to respectively retain or eliminate any duplicate values.

Example  

This example returns the minimum value of tickets sold, the maximum value of tickets sold, the average of the tickets sold and the total amount of tickets sold for the MOVIES table:

SELECT MIN(Tickets_Sold),
MAX(Tickets_Sold),
AVG(Tickets_Sold),
SUM(Tickets_Sold)
FROM MOVIES

 
PROPERTIES 

Product: 4D
Theme: Functions

 
SEE ALSO 

COUNT
SUM

 
ARTICLE USAGE

4D SQL Reference ( 4D v11 SQL Release 4 )
4D SQL Reference ( 4D v14)
4D SQL Reference ( 4D v12.1)
4D SQL Reference ( 4D v13.4)
4D SQL Reference ( 4D v14 R2)
4D SQL Reference ( 4D v14 R3)
4D SQL Reference ( 4D v14 R4)