Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Manager-Employee Relationships | Section
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
SQL Joins in Depth
Sectionย 1. Chapterย 10
single

single

bookChallenge: Manager-Employee Relationships

Swipe to show menu

Task

Swipe to start coding

Write a query using a self-join to list each employee's name alongside their manager's name.

  • Select the employee's name from the employees table.
  • Give it an alias employee_name.
  • Use a self-join on the employees table to match each employee to their manager by manager_id.
  • Select the manager's name from the joined table.
  • Give it an alias manager_name.
  • Include all employees, even those who do not have a manager.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Sectionย 1. Chapterย 10
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt