Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Classes Without Teachers | Handling NULLs, Performance, and Real-World Join Scenarios
SQL Joins in Depth

bookChallenge: Classes Without Teachers

Task

Swipe to start coding

Write a query to produce a list of all classes along with their assigned teacher names. If a class does not have a teacher assigned, display 'Unassigned' as the teacher name instead.

  • Select the class ID and class name from the classes table.
  • Include the teacher's name for each class using a join with the teachers table.
  • For classes without an assigned teacher, display 'Unassigned' as the teacher name.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 7
single

single

Ask AI

expand

Ask AI

ChatGPT

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

close

bookChallenge: Classes Without Teachers

Swipe to show menu

Task

Swipe to start coding

Write a query to produce a list of all classes along with their assigned teacher names. If a class does not have a teacher assigned, display 'Unassigned' as the teacher name instead.

  • Select the class ID and class name from the classes table.
  • Include the teacher's name for each class using a join with the teachers table.
  • For classes without an assigned teacher, display 'Unassigned' as the teacher name.

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Β 3. ChapterΒ 7
single

single

some-alt