SQL Topic
SELECT and WHERE
The foundation of every query: choosing columns with SELECT and filtering rows with WHERE. Easy interview questions are almost always a clean SELECT ... WHERE with a twist like NULL-safe comparison or OR logic.
When is SELECT and WHERE used?
Filtering by one or more conditions, NULL-safe equality, and simple projections.
Core syntax
SELECT col1, col2 FROM table WHERE condition — combine conditions with AND / OR.Common mistakes
- Filtering NULLs with = instead of IS NULL.
- Forgetting parentheses when mixing AND and OR.
- Selecting more columns than the question asks for.
Practice SELECT and WHERE questions
Work through them in order — each question builds on the last.