CodingFoundations

SQL

Easynot started
Mediumnot started
Hardnot started
Window functionsAn aggregate that hands the rows back to you, every row survives, but now it knows something about its group.6 minJoinsA join looks at every possible pairing of two tables and keeps the pairs you asked for, everything surprising about joins follows from that one sentence.5 minDates and time bucketsAn instant is only a point on a line, the calendar appears when a person asks for it.5 minDuplicatesRows are only duplicates with respect to a key you choose, so choose it first, then decide which copy deserves to survive.5 minNULLs and three-valued logicNULL is not a value, it is the database politely saying “I don’t know” , and you cannot compare your way out of that.5 minAnti-joinsKeep the rows on the left that never found a partner on the right, the customers who never ordered.5 minSubqueriesA query you drop inside another query, and its shape (one value, a set, or a table) decides which rules apply.6 minConditional aggregationAsk the table once, and let every row answer several questions on its way past.5 minTop N per groupRank inside each group first, then keep the small numbers from the outside, and decide what a tie means before you choose the ranking function.5 minSelf-joinsOne table listed twice under two names is two roles, not two tables.4 minFunnel queriesA funnel counts people , and it counts them in order, not rows in a log.5 minGaps and islandsSubtract a row's position inside its group from its position overall, within one unbroken run, that difference never moves.5 minRecursive CTEsA query that keeps feeding its own output back into itself, until a round comes up empty.6 min