-
Notifications
You must be signed in to change notification settings - Fork 549
Description
In the course we checked how many times one employee had an increase. So we already know there are multiple salary values per single employee. Getting simple AVG(salary) is also including historical values which will not give us the actual current value for average salary, instead average for the entire column. Not a good output if you are to answer the CEO asking how much we spend monthly on salaries (and you miss to report the extra ~10k).
Looking at the data itself the current salary of the employees has a to_date '9999-01-01' and adding a WHERE clause would give us accurate info.
As this is early on the course exercise I realize the goal is different and students should simply practice use of AVG. Maybe consider changing the question from
- What is the average salary for the company? to
- What is the all time average salary for the company?