Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Student-Class Report with Defaults | Handling NULLs, Performance, and Real-World Join Scenarios
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
SQL Joins in Depth

bookChallenge: Student-Class Report with Defaults

Tarefa

Swipe to start coding

Write a query to generate a report listing each student's name and their class name. If a student does not have a class assigned, display 'Unassigned' instead of a NULL class name.

  • Use a LEFT JOIN to combine the students and classes tables based on the class_id.
  • Select the student's name from the students table.
  • Select the class name from the classes table, replacing any NULL values with 'Unassigned' using the COALESCE function.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 2
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Student-Class Report with Defaults

Deslize para mostrar o menu

Tarefa

Swipe to start coding

Write a query to generate a report listing each student's name and their class name. If a student does not have a class assigned, display 'Unassigned' instead of a NULL class name.

  • Use a LEFT JOIN to combine the students and classes tables based on the class_id.
  • Select the student's name from the students table.
  • Select the class name from the classes table, replacing any NULL values with 'Unassigned' using the COALESCE function.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 2
single

single

some-alt