

Category · Databases
Ask the database so it answers fast
Tables and SELECT, filtering and sorting, JOIN, grouping, changing data, schema and constraints, subqueries and WITH, indexes and EXPLAIN, concurrent changes, window functions. The language almost every database understands.
10 lessons112 min
To the first lessonCheatsheet nowTopics, each as its own lesson

01Tables and SELECTDemoA table is rows and columns. SELECT picks which columns to show.
9 min
02WHERE, ORDER BY, LIMITFilter, sort, take the first page.
10 min
03JOIN: linking tablesAn order knows its user_id. JOIN fetches the user's name alongside.
12 min
04GROUP BY and aggregatesCOUNT, SUM, AVG: reports without a loop in your code.
11 min
05Changing data, transactions, indexesINSERT, UPDATE, DELETE, carefully. A transaction is all or nothing.
12 min
06CREATE TABLE: types and constraintsRules in the table itself won't let garbage in, even if the app makes a mistake.
12 min
07Subqueries and WITHA complex query is easier to read when it's split into named steps.
11 min
08Indexes and EXPLAINWhy the same query takes 2 ms on one database and 2 seconds on another.
12 min
09Concurrent changes: locks and upsertTwo buyers take the last item in the same millisecond. Who gets it?
12 min
10Window functionsAn aggregate that doesn't collapse rows: rank, running total.
11 min0/10 topics open. This is the course intro, not the whole course on one page.
In the knowledge base
Reference pages for the technologies on this topic: who maintains them, when to use them and what interviews ask.