Exercise: Multiple Conditions
Find grade A students in programming courses.
Solution
sql
1SELECT s.name, s.grade, c.course_name
2FROM students s
3JOIN courses c ON s.course_id = c.id
4WHERE s.grade = 'A'
5AND c.category = 'Programming';
Find grade A students in programming courses.
1SELECT s.name, s.grade, c.course_name
2FROM students s
3JOIN courses c ON s.course_id = c.id
4WHERE s.grade = 'A'
5AND c.category = 'Programming';