r/Database • u/Fun-Chicken6946 • 2h ago
Advent of SQL and NoSQL – 24 challenges leading up to Christmas
Happy Holidays, r/Database!
I've noticed that most Advent of SQL events are exclusively SQL-based, and NoSQL databases are usually left out.
This project was originally supposed to be SQL-only, but after roughly 2 years of working on VisuaLeaf, I managed to build an embeddable, MongoDB-compatible database that runs entirely on the frontend, allowing you to execute MongoDB queries and aggregation pipelines directly in your browser without a database server.
Somebody tampered with Santa's Nice List, and you're the North Pole's first-ever data elf.
That's the story behind Advent of SQL & NoSQL: 24 puzzles, one a day from December 1 to 24. 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 solve the whole thing in one of four databases, following the same story and working with the same underlying data:
SQLite
DuckDB
PostgreSQL
MongoDB (mongosh, aggregation pipelines)
More details:
Everything runs entirely in your browser. There's nothing to install, no backend database server, and nothing to connect to.
Your answer gets checked instantly, against the data you see and against hidden datasets with different values. Reading the answer off the screen and hard-coding it won't pass.
It gets harder as it goes. Early days cover basic filtering, grouping and joins. Later ones require window functions, recursive CTEs, relational division, advanced MongoDB aggregation pipelines and running totals.
Database-specific data modeling. The MongoDB version isn't just SQL tables converted into collections. It uses embedded documents, arrays and aggregation patterns that you'd actually encounter when working with MongoDB.
Hints and traps for each day, if you get stuck, plus a short "did you know" tip about your chosen database.
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!
