Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
More Complex Filtering | Grouping
course content

Contenido del Curso

Intermediate SQL

More Complex FilteringMore Complex Filtering

Previously, the school held a competition for students who took Mathematics, and some of them were rewarded. Now, the school wants to ensure that there are no students who cheat and take more than one exam, including the math exam.

Therefore, the school has asked us to retrieve the last names of those students who took more than one exam, one of which was Mathematics.

Here is the query from our previous assignment that you can use as an example:

Note

Use the WHERE clause to solve this task.

Here is a preview of the student_grades table we are working with:

id student_surname class_letter subject_name grade
1 Smith A Mathematics 85
2 Johnson B Physics 90
3 Williams C Chemistry 78
4 Brown A Biology 92
... ... ... ... ...
100 Gonzales A Biology 89

Tarea

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 surname of these students. The answer should have only one column.

¿Todo estuvo claro?

Sección 1. Capítulo 8
toggle bottom row
course content

Contenido del Curso

Intermediate SQL

More Complex FilteringMore Complex Filtering

Previously, the school held a competition for students who took Mathematics, and some of them were rewarded. Now, the school wants to ensure that there are no students who cheat and take more than one exam, including the math exam.

Therefore, the school has asked us to retrieve the last names of those students who took more than one exam, one of which was Mathematics.

Here is the query from our previous assignment that you can use as an example:

Note

Use the WHERE clause to solve this task.

Here is a preview of the student_grades table we are working with:

id student_surname class_letter subject_name grade
1 Smith A Mathematics 85
2 Johnson B Physics 90
3 Williams C Chemistry 78
4 Brown A Biology 92
... ... ... ... ...
100 Gonzales A Biology 89

Tarea

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 surname of these students. The answer should have only one column.

¿Todo estuvo claro?

Sección 1. Capítulo 8
toggle bottom row
some-alt