SQL
WHERE
WHERE filters which rows come back, based on a
condition.
Example: filtering with a condition
SELECT name, score FROM students WHERE score >= 85;
name | score
Ada | 92
Musa | 85
Combine multiple conditions with AND (both must be true)
or OR (at least one must be true) — for example,
WHERE score >= 85 AND track = 'Frontend' would narrow the
result down to just Ada, since Musa's track doesn't match even though
their score does.
SELECT name, score FROM students WHERE score >= 85;
name | score
Ada | 92
Musa | 85