Syllabus

  1. 01SubqueriesNest one query inside another: compare rows with a computed value, filter with IN, NOT IN and EXISTS, aggregate in several steps with subqueries in FROM, and write correlated subqueries that run once per row.4 lessons
    1. 01Subqueries in WHERE
    2. 02IN, NOT IN and EXISTS
    3. 03Subqueries in FROM
    4. 04Correlated Subqueries
  2. 02Set OperationsCombine the rows of several queries: stack them with UNION and UNION ALL, aggregate across similar tables without losing rows, and compare lists with INTERSECT and EXCEPT.3 lessons
    1. 01Stack Rows with UNION
    2. 02Aggregate Across Tables with UNION ALL
    3. 03Compare Lists with INTERSECT and EXCEPT
  3. 03Conditional AggregatesCount and add up only the rows that meet a condition: measure missing values, sort rows into buckets with CASE, build side-by-side counts with FILTER and SUM(CASE), and turn them into rates.4 lessons
    1. 01Count What's Missing
    2. 02Group by Buckets with CASE
    3. 03Conditional Counts and Sums
    4. 04Rates from Conditional Aggregates
  4. 04Date, Number and String FunctionsUse PostgreSQL's built-in functions to compute durations and calendar parts, calculate and round prices, and clean up messy text, then combine every technique from the course in a final project.5 lessons
    1. 01Dates and Times
    2. 02Numbers
    3. 03Strings
    4. 04Project: Clean Up a Festival's Ticket Sales
    5. 05Course Quiz