SQL

The Cohort Time Machine

Turn a pile of dated events into a story: bucket by month, measure growth and retention, and smooth the noise with rolling averages over time.

SQLAdvancedPortfolio piece

What you'll be able to build

Turn a pile of dated events into a story: bucket by month, measure growth and retention, and smooth the noise with rolling averages over time. Along the way you pick up real, transferable SQL skills, not just this one project:

  • Dates-as-TEXT in SQLite and strftime() bucketing (year/month/weekday)
  • GROUP BY a derived time bucket
  • julianday() date arithmetic (days between events)
  • Period-over-period change with LAG() over an ordered timeline
  • Rolling N-period averages with a window frame (ROWS BETWEEN)
  • Self-join / window for first-vs-latest event per entity (retention)

A course like this one

Yours is built from your own placement, so module count and depth will differ. This map shows what a advanced-level SQL learner building The Cohort Time Machine actually gets.

  1. Module 1: Advanced Tables, Rows, and Query Intent5 lessons

    Builds the production-ready version of the table model for your the cohort time machine.

  2. Module 2: Advanced Reusable Query Patterns5 lessons

    Builds the production-ready version of the reusable query helper for your the cohort time machine.

  3. Module 3: Advanced Transactions and Data Boundaries5 lessons

    Builds the production-ready version of the transaction boundary for your the cohort time machine.

  4. Module 4: Advanced Joins, Groups, and Data Shape5 lessons

    Builds the production-ready version of the join shape workflow for your the cohort time machine.

  5. Module 5: Advanced Filters, Conditions, and Result Sets5 lessons

    Builds the production-ready version of the filter rule that powers your the cohort time machine.

  6. Module 6: Advanced Reliable Reporting Queries3 lessons

    Builds the production-ready version of the report query for your the cohort time machine.

How the lessons actually work

Every lesson has you predict what a piece of SQL code will output before you run it, then run it for real in your browser and fix what you got wrong. Each module ends in a challenge gate with hidden tests, so you can't advance until your code actually works. The course closes with a capstone that assembles everything into The Cohort Time Machine, and a runnable proof page tied to your own code.

Common questions

How long does the The Cohort Time Machine course take?

about 7 hours, across 6 modules and 28 lessons, at roughly 15 minutes per lesson. Your own course may run shorter or longer, since it's sized to your placement result, not a fixed template.

Do I need experience?

Yes. This is an advanced-tier SQL project, so it assumes you're already comfortable writing and reading SQL before you start.

How much does it cost?

$15 one-time, no subscription. The first module is free, so you can see exactly how the course teaches before you pay for the rest.

No subscription. Module one is free.

Build my The Cohort Time Machine