#19 Average Salary by Department

Companies:
Innotech Itone
Themes:
SQLJoinsAggregationPractice

Two tables are given

Text
employees
emp_id | surname | salary | department_id
...

departments
department_id | department_name
...

Return the list of departments and the average salary by department where the department's average salary is greater than 5000. Expected result:

Text
department_name | avg_salary
HR 8000
IT 12000
...

Question review

Mentor
Answer as you would in a real interview. I’ll ask follow-up questions, then compare your answer with the reference answer and show your accuracy as a %.
Sign in to start the dialogue The mentor keeps the context of the current question and your previous messages.
Sign in