#479 SQL Queries for Employees, Departments, and Salaries

Companies:
Unknown company
Themes:
SQLJoinsSubqueriesPractice

There are two tables:

department with fields
-department_id,
-department_name.

employee with fields
-employee_id,
-first_name,
-last_name,
-salary,
-department_id
  1. Write a query that displays the employee's first name, last name, department name, and salary;
  2. Add a column containing the average salary in the employee's department;
  3. Display the three highest-paid employees from each department.

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