← SQL tutorial

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.

Example
SELECT name, score FROM students WHERE score >= 85;
Output
name | score
Ada  | 92
Musa | 85
Ready to go further?

These free tutorials are a preview, our Backend Development cohort covers it in depth, with a real project and a cohort alongside you. Closes Nov 30

Enroll in Backend Development

Cookie preferences

Choose what you're comfortable with. You can change this any time from the footer.

Don't miss out

Ready to build something real?

Create a free account to enroll in a track, and get notified the moment a cohort opens.

Create free account