Skip to main content
dbSyntax
Home CoursePracticeReferenceModelingInterview Prep
Start Here
  • What is a database?
  • What is SQL?
  • SQL syntax
  • SQL datatypes
  • How to run queries (tooling)
  • How to read tables/ERDs
SQL Foundations
  • SELECT / FROM
  • ORDER BY
  • LIMIT / OFFSET
  • DISTINCT
  • Aliases
Filtering
  • WHERE
  • AND / OR / NOT
  • IN / BETWEEN
  • LIKE
  • NULL (IS NULL, COALESCE)
Aggregation
  • COUNT / SUM / AVG / MIN / MAX
  • GROUP BY
  • HAVING
  • CASE & Conditional Aggregation
Joins
  • Joins Intro
  • INNER JOIN
  • LEFT JOIN
  • RIGHT JOIN
  • FULL OUTER JOIN
  • CROSS JOIN
  • Self Join
  • Join Debugging: Duplicates & Missing Rows
  • UNION vs UNION ALL
Subqueries & CTEs
  • Subqueries (IN / EXISTS)
  • Correlated Subqueries
  • WITH (CTEs)
Window Functions
  • OVER / PARTITION BY / ORDER BY
  • ROW_NUMBER / RANK / DENSE_RANK
  • LAG / LEAD
  • Moving Averages & Running Totals
  • QUALIFY
Data Cleaning
  • String Cleanup
  • Date Parsing
  • Deduping
Analytics Patterns
  • Top-N Per Group
  • Cohorts & Retention
  • Funnels
  • Rolling Metrics & Period-over-Period
Performance Modeling
  • Index Intuition
  • Normal Forms
  • Reading Explain Plans
Capstone
  • Capstone Part 1: KPI Baseline
  • Capstone Part 2: Cohorts & Retention
  • Capstone Part 3: Segments & Recommendation
Home / Course / Filtering

Filtering

Learn SQL filtering with practical examples and guided drills on dbSyntax.

Start with WHERE

WHERE

Beginner

WHERE decides which rows are eligible for everything that comes after. If a filter is wrong, every downstream number is wrong, even when the...

AND / OR / NOT

Beginner

Most real filters are multi-part: paid orders from this quarter, customers in these three countries but not trial accounts, etc. AND, OR, an...

IN / BETWEEN

Beginner

Once you have written a few WHERE clauses, two patterns show up over and over: "is this value one of a list?" and "is this value in a range?...

LIKE

Beginner

= checks for exact equality. LIKE lets you match text by pattern: prefixes, suffixes, substrings, and single-character gaps. It is how you a...

NULL (IS NULL, COALESCE)

Beginner

NULL means missing or unknown. It is not zero. It is not an empty string. It is not false. It is the absence of a value, and SQL treats it d...

dbSyntax Write and Run SQL in Your Browser
CoursePracticeReferenceModelingInterview PrepPrivacyTerms
© 2026 dbSyntax.