Write a query to retrieve the names of all students in the Gryffindor faculty who have received a mark of 5 or higher in any subject.
The result table should require:
- students names
Here is the plan for your query:
- Break down the query into smaller parts to make it more manageable.
- Use
INNER JOINto join the 'students' and 'faculty_name' tables. - Use an
EXISTSsubquery to check for marks of 5 or higher.