Basics

  1. Hello, SELECT β€” Selecting constants and a first query.
  2. Columns & Aliases β€” Selecting specific columns, aliasing, schema-qualified names.
  3. WHERE Filters β€” Common predicates, BETWEEN/IN/LIKE/IS NULL and sargability notes.
  4. ORDER BY & TOP β€” Sorting, TOP, WITH TIES, NULLS LAST workaround.
  5. CASE Expressions β€” Simple vs searched CASE, default branch, common patterns.
  6. NULLs & 3-Valued Logic β€” NULL behavior, COALESCE/ISNULL, comparisons and pitfalls.
  7. 🚧 DISTINCT & Deduping β€” Use DISTINCT and ROW_NUMBER to remove duplicates.
  8. 🚧 Subqueries β€” Scalar, correlated, and table subqueries.
  9. 🚧 EXISTS vs IN β€” Compare semi-joins with EXISTS and IN.
  10. 🚧 CTEs β€” Common Table Expressions, basic and recursive.
  11. 🚧 Set Operators β€” UNION, INTERSECT, and EXCEPT patterns.
  12. 🚧 CROSS JOIN & Self Join β€” Cartesian products and self-joins.