SQL Data Analyst — Medium
Key points
- This expression uses the AVG function to find the average salary.
- The PARTITION BY dept divides the data by department.
- The ORDER BY hire_date arranges the data in chronological order.
- The ROWS BETWEEN 2 PRECEDING AND CURRENT ROW specifies the window frame for the moving average.
Ready to go further?
Related questions
