Hi folks,
I saw adventofsql.com pop up in r/Elixir a few weeks ago and signed-up, then promptly forgot all about it …until I opened my email this morning!
The day 1 puzzle was fun - not too hard, and I spent more time transforming the data than anything. You can see my working solution here (spoiler!) - and in a gist for posterity (again, spoiler!).
Full disclosure: I used ChatGPT quite a bit to guide me, and especially to write the Python script which converts the JSON strings into plain XTDB-flavoured SQL literals
Unlike Postgres, which has lots of JSON-specific functionality, XTDB was able to achieve everything using the first-class support for objects and arrays.
I posted over on the r/SQL thread, and there’s also a now a dedicated subreddit r/adventofsql
Definitely looking forward to tomorrow morning