SQL: querying and analyzing relational data

8 steps · about 4 h · Beginner

  1. Understand relational tables and basic SELECT (tutorial, Khan Academy, 25 min)

    Learn how tables organize records into columns and how to extract specific fields.

  2. Query and filter rows with WHERE (interactive, SQLBolt, 30 min)

    Practice comparisons, logical operators, and NULL checks directly in the browser.

  3. Sort and paginate results with ORDER BY and LIMIT (interactive, SQLBolt, 25 min)

    Ordering and slicing datasets is fundamental for reports and user interfaces.

  4. Combine tables using INNER and LEFT JOINs (interactive, SQLBolt, 35 min)

    Relational databases shine when connecting disparate entities via foreign keys.

  5. Aggregate data with COUNT, SUM, AVG and GROUP BY (interactive, SQLBolt, 35 min)

    Grouping data produces executive summaries and statistical insights.

  6. Filter aggregated groups with HAVING (interactive, SQLBolt, 25 min)

    Distinguish between filtering raw rows with WHERE versus grouped records with HAVING.

  7. Write subqueries and nested data transformations (tutorial, Khan Academy, 35 min)

    Subqueries let you calculate intermediate metrics to filter or join against.

  8. Understand indexes and query performance basics (guide, Use The Index, Luke, 30 min)

    Know how B-tree indexes prevent slow table scans as database volume grows.