Challenge: Student-Class Report with Defaults
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 2
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 4.76
Challenge: Student-Class Report with Defaults
Свайпніть щоб показати меню
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 2
single