Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Function Reference » Alphabetical list of functions

ATAN2 function [Numeric] Next Page

AVG function [Aggregate]

Computes the average, for a set of rows, of a numeric expression or of a set unique values.

Syntax 1

AVG( numeric-expression | DISTINCT numeric-expression )


numeric-expression    The expression whose average is calculated over a set of rows.

DISTINCT numeric-expression    Computes the average of the unique numeric values in the input.


This average does not include rows where the numeric-expression is the NULL value. Returns the NULL value for a group containing no rows.

See also
Standards and compatibility

The following statement returns the value 49988.623200.

SELECT AVG( Salary ) FROM Employees ;

The following statement could be used to determine the average based on unique prices in the production list:

SELECT AVG( DISTINCT ListPrice ) FROM Production ;