Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Manager-Employee Relationships | Advanced Join Techniques and Multi-Table Queries
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
SQL Joins in Depth

bookChallenge: Manager-Employee Relationships

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.
  • 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.
  • Include all employees, even those who do not have a manager.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 4
single

single

Ask AI

expand

Ask AI

ChatGPT

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

close

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.
  • 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.
  • 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Β 2. ChapterΒ 4
single

single

some-alt