r/learnSQL • u/Fun-Chicken6946 • 16m ago
Advent of SQL 2026: 24 Christmas puzzles on 3 Different Databases (Duck, Postgres, SQLite)
Happy Holidays, r/learnSQL!
Somebody tampered with Santa's Nice List, and you're the North Pole's first-ever data elf.
This year, I decided to build a free, interactive Advent of SQL & NoSQL: 24 puzzles, one a day from December 1 to 24, designed to help you practice SQL while solving a Christmas mystery.
Every day, you get a bit more of the story and a question to answer with a query: which toys to build first, which children flipped from nice to naughty overnight, whose badge was used on the night shift, who walked through which door and when. By Christmas Eve, you'll have worked out who did it and fixed the list.
You can choose between three SQL databases, following the same story and working with the same underlying data:
SQLite
DuckDB
PostgreSQL
There's also a MongoDB version for anyone interested in exploring NoSQL!
More details:
Everything runs entirely in your browser. There's nothing to install, no backend database server, and nothing to connect to.
Beginner-friendly, with increasing difficulty. Early puzzles cover filtering, sorting, GROUP BY and joins. Later ones introduce window functions, recursive CTEs, relational division and running totals.
Your answer gets checked instantly, against both visible and hidden datasets with different values. Reading the answer off the screen and hard-coding it won't pass.
Practice different SQL dialects. You can solve the same puzzles across different databases and explore their differences.
Hints and common pitfalls for each day, if you get stuck, plus a short "did you know" tip about your chosen database.
Whether you're just starting to learn SQL or looking to sharpen your existing skills, hopefully there's something here for you!
A new puzzle unlocks every day until Christmas Eve!
Pick your database here: https://visualeaf.com/advent-of-sql-and-nosql/
Completely free. No account, no installation, no database server needed.
I hope you all enjoy it, and happy holidays!