Challenge: 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
studentsandclassestables based on theclass_id. - Select the student's name from the
studentstable. - Select the class name from the
classestable, replacing any NULL values with 'Unassigned' using the COALESCE function.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 2
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 4.76
Challenge: 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
studentsandclassestables based on theclass_id. - Select the student's name from the
studentstable. - Select the class name from the
classestable, replacing any NULL values with 'Unassigned' using the COALESCE function.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 2
single