Складніші Фільтри
Раніше школа проводила змагання для учнів, які складали Математику, і деякі з них отримали нагороди. Тепер школа хоче переконатися, що не буде учнів, які обманюють та складають більше одного іспиту, включаючи іспит з математики.
Тому школа попросила нас визначити прізвища тих учнів, які склали більше одного іспиту, одним з яких був Mathematics .
Ось запит з нашого попереднього завдання, який ви можете використати як приклад:
1234SELECT student_surname, AVG(grade) as average_grade FROM student_grades GROUP BY student_surname HAVING COUNT(grade) > 1
Swipe to start coding
Retrieve the last names of those students who received more than one grade and one of the subjects they took was Mathematics.
Note
Retrieve only the
surnameof these students. The answer should have only one column.
Brief Instructions
- Retrieve the
student_surnamecolumn. - Use the
WHEREclause to setsubject_name = 'Mathematics'. - Group the results by
student_surname. - Use the
HAVINGclause withCOUNT(grade) > 1.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 4
Складніші Фільтри
Свайпніть щоб показати меню
Раніше школа проводила змагання для учнів, які складали Математику, і деякі з них отримали нагороди. Тепер школа хоче переконатися, що не буде учнів, які обманюють та складають більше одного іспиту, включаючи іспит з математики.
Тому школа попросила нас визначити прізвища тих учнів, які склали більше одного іспиту, одним з яких був Mathematics .
Ось запит з нашого попереднього завдання, який ви можете використати як приклад:
1234SELECT student_surname, AVG(grade) as average_grade FROM student_grades GROUP BY student_surname HAVING COUNT(grade) > 1
Swipe to start coding
Retrieve the last names of those students who received more than one grade and one of the subjects they took was Mathematics.
Note
Retrieve only the
surnameof these students. The answer should have only one column.
Brief Instructions
- Retrieve the
student_surnamecolumn. - Use the
WHEREclause to setsubject_name = 'Mathematics'. - Group the results by
student_surname. - Use the
HAVINGclause withCOUNT(grade) > 1.
Рішення
Дякуємо за ваш відгук!
single