Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question 1 - Average salary is a bit misleading #27

Open
AMGitName opened this issue Sep 13, 2022 · 0 comments
Open

Question 1 - Average salary is a bit misleading #27

AMGitName opened this issue Sep 13, 2022 · 0 comments

Comments

@AMGitName
Copy link

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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant