Learning advanced SQL the weird (and hard) way
summary
Claims to solve Advent of Code puzzles using only Postgres SQL and succeeds on many days, beating a Java attempt by one home competitor. Uses Postgres 17 with no extensions, loading inputs via psql backslash copy into text columns, adding IDs, vacuum analyze and indexes for performance, and tools like generate_series, generated columns, ranges, geometric types and heavy regexp. Implements recursion with recursive CTEs or iterative procedures invoked via psql exec, organizes each day in its own schema, sometimes runs up to a two‑day timeout, and learns concrete limits and unexpected tricks.
AI-written summary · about
chapters (26)
- 0:00Intro
- 0:21About me
- 2:25Slides
- 4:02Advent of Code
- 5:55AI vs SQL
- 6:58Rules
- 8:41First things I learned
- 9:48Creating a repository
- 10:55Loading data
- 12:35Dropping a schema
- 13:48Data types
- 15:18Performance
- 16:50Tools and tips
- 19:11Generate Series
- 19:59Ordinality
- 21:36ID
- 22:22Poker
- 23:40Regular Expressions
- 25:35Documentation
- 26:21Pivot tables
- 27:15Vicks code
- 27:47Cities
- 29:30Recurse
- 32:12Null
- 33:45Comments
- 38:06Questions








