SQL reference
One page per concept, each with a real database in it. Read the explanation, then change the query and run it — nothing to install, no account, and the engine runs in your browser rather than on a server somewhere.
- SQL joinsA join matches rows in one table against rows in another using a condition you supply. Which join you pick decides one thing only: what happens to the rows that find no match.
- COALESCE in SQLCOALESCE takes a list of values and returns the first one that is not NULL. Everything else about it follows from that single sentence.
- SQL window functionsA window function does the arithmetic of an aggregate without throwing the rows away. SUM(cost) collapses twelve treatments into one number; SUM(cost) OVER () puts that same number beside all twelve.
- CASE in SQLCASE is if/else that produces a value rather than controlling what runs. It goes anywhere a value can go — the SELECT list, ORDER BY, GROUP BY, even inside an aggregate.
More is coming
Joins, CASE, window functions and the rest are being written. In the meantime, Accession is the same SQL as a museum records puzzle — six levels, and you write every query yourself.