Query to obtain cumulative average or running average from employee table for salary column.
select Employee_id, Salary,
AVG(Salary) OVER (ORDER BY Employee_id)
As RunningAverage
from employee;
Blogger, Engineer & Entrepreneur
Query to obtain cumulative average or running average from employee table for salary column.
select Employee_id, Salary,
AVG(Salary) OVER (ORDER BY Employee_id)
As RunningAverage
from employee;
Facebook Comments