Filter with WHERE in SQL
WHERE keeps only the rows whose condition holds.
SELECT
id,
name,
signup_date
FROM users
WHERE signup_date >= '2026-01-01';
How it works
- Each clause opens its own line, so the query reads top to bottom.
- Comparison operators work on numbers, text and dates alike.
- Rows that fail the test never reach the result.
Keywords and builtins used here
FROMSELECTWHERE
The run, in numbers
- Lines
- 6
- Characters to type
- 74
- Tokens
- 14
- Three-star pace
- 70 tpm
At the three-star pace of 70 tokens a minute, this run takes about 12 seconds.
Step 4 of 5 in Selecting rows, step 4 of 23 in Language basics.