Data Scholar
ArticlesProjectsLearningAbout
Sign inSubscribe
SQL Basics

9 modules · 28 topics

  1. 1SELECT fundamentals
    • Projection: SELECT, expressions, aliases
    • Filtering: WHERE and boolean logic
    • Shaping: ORDER BY, LIMIT, DISTINCT
    • Exercises: SELECT fundamentals
  2. 2NULL, the silent killer
    • Three-valued logic
    • NULLs in aggregates, COALESCE, and sorting
    • Exercises: NULL logic
  3. 3Aggregation and GROUP BY discipline
    • The aggregate functions
    • GROUP BY and HAVING
    • Conditional aggregation
    • Exercises: aggregation
  4. 4Joins, really
    • INNER JOIN mechanics
    • LEFT JOIN and the ON vs WHERE trap
    • Self joins, FULL OUTER, CROSS, and EXISTS
    • Exercises: joins
  5. 5Subqueries and CTEs
    • Subqueries: scalar, IN, EXISTS, correlated
    • CTEs: queries that read like reasoning
    • Exercises: subqueries and CTEs
  6. 6Set operations
    • UNION, INTERSECT, EXCEPT
    • Exercises: set operations
  7. 7CASE and the expression toolkit
    • CASE logic
    • Strings, dates, and numbers
    • Exercises: CASE and expressions
  8. 8First window functions
    • Ranking: ROW_NUMBER, RANK, DENSE_RANK
    • Windowed aggregates, LAG, and running totals
    • Exercises: window functions
  9. 9The gauntlet
    • How to attack an unseen question
    • Exercises: the gauntlet
← SQL Basics
Course contents
SQL Basics

9 modules · 28 topics

  1. 1SELECT fundamentals
    • Projection: SELECT, expressions, aliases
    • Filtering: WHERE and boolean logic
    • Shaping: ORDER BY, LIMIT, DISTINCT
    • Exercises: SELECT fundamentals
  2. 2NULL, the silent killer
    • Three-valued logic
    • NULLs in aggregates, COALESCE, and sorting
    • Exercises: NULL logic
  3. 3Aggregation and GROUP BY discipline
    • The aggregate functions
    • GROUP BY and HAVING
    • Conditional aggregation
    • Exercises: aggregation
  4. 4Joins, really
    • INNER JOIN mechanics
    • LEFT JOIN and the ON vs WHERE trap
    • Self joins, FULL OUTER, CROSS, and EXISTS
    • Exercises: joins
  5. 5Subqueries and CTEs
    • Subqueries: scalar, IN, EXISTS, correlated
    • CTEs: queries that read like reasoning
    • Exercises: subqueries and CTEs
  6. 6Set operations
    • UNION, INTERSECT, EXCEPT
    • Exercises: set operations
  7. 7CASE and the expression toolkit
    • CASE logic
    • Strings, dates, and numbers
    • Exercises: CASE and expressions
  8. 8First window functions
    • Ranking: ROW_NUMBER, RANK, DENSE_RANK
    • Windowed aggregates, LAG, and running totals
    • Exercises: window functions
  9. 9The gauntlet
    • How to attack an unseen question
    • Exercises: the gauntlet

Topic · Joins, really

LEFT JOIN and the ON vs WHERE trap


Sign in to continue

Course content is free with an account. Sign in to read this and keep your progress.

Sign inCreate account
Data Scholar

Data Scholar is where data and AI get learned properly, from first principles to production: articles, end-to-end build write-ups, free courses, and open-source projects for data analysts, data engineers, and AI and GenAI engineers.

Explore

  • Articles
  • Projects
  • Learning
  • About

Get updates

New articles, projects, and courses, straight to your inbox.

Subscribe

© 2026 Data Scholar. Always free.

PrivacyTerms of Use