SQL AVG() Function

SQL AVG() Function return average value of expression.

Supported Oracle SQL Version

  • Oracle 8i
  • Oracle 9i
  • Oracle 10g
  • Oracle 11g
  • Oracle 12c
  • Oracle 18c

Syntax

AVG( expression )

Example

Consider following emp_salary is our example table to find average salary using SQL AVG function.

SQL> SELECT * from emp_salary;

       NUM NAME                          SALARY
---------- ------------------------- ----------
         2 Max Miller                      2830
         3 Beccaa Moss                     2175
         4 Paul Singh                      5405
         5 Ken Myer                        3390
         6 Jack Evans                      3870

SQL> SELECT AVG(salary) "AVG SALARY" FROM emp_salary;

AVG SALARY
----------
      3534

Run it...   »