AVG function is to calculate the average in Oracle.
Syntax
AVG function takes an aggregate expression as an argument and returns average value.
AVG (aggregate expression)
AVG Function Example
The following example will calculate the average salary by the department from the EMP table.
SELECT deptno, AVG (sal) FROM emp GROUP BY deptno;
Output
DEPTNO AVG(SAL) ---------- ---------- 30Â Â Â Â Â 1566.66667 20Â Â Â Â Â 2175 10Â Â Â Â Â 2743