...

/

Solution: Connect Two Tables

Solution: Connect Two Tables

We'll cover the following...

Query

SELECT s.id, s.name, g.score AS math_grade
FROM students s
LEFT JOIN grades g
ON s.id = g.student_id AND g.subject = 'Math';

Explanation

This query shows each student along with their Math grade (if available). ...