Data science · Modelling and SQL — from a number to a decision

SQL that answers the question you were asked

The SQL round is not testing syntax, it is testing whether your query means what you think it means. This runs three queries that return confident wrong answers — a join that inflates revenue by 84%, a "never redeemed" filter that returns nothing because of one NULL, and a first-purchase query with a tie — and the window-function patterns that get each one right.

28 min read Full lesson in the app Patterns: join-fan-out, anti-join, window-functions, null-semantics

What you'll be able to do

Before this: cohorts-that-are-not-lying-to-you

The rest of this lesson is in the app

The SQL round is not testing syntax, it is testing whether your query means what you think it means. This runs three queries that return confident wrong answers — a join that inflates revenue by 84%, a "never redeemed" filter that returns nothing because of one NULL, and a first-purchase query with a tie — and the window-function patterns that get each one right. This walkthrough runs about 28 minutes, with runnable code you can edit and re-run as you read.

Continue in ChannelPulse

The first module of every track is free to read on the web — see what's open in Data science.