Originally, before I had given the fractal talk, I had wanted to make a compiler from a low level imperative programming language to SQL. I had done a similar thing in the past to write FizzBuzz in the esoteric programming language Fractran[2]. By doing that, you can fairly easily produce SQL queries that perform arbitrary computations. When I was brainstorming what examples to give, I thought it would be really cool to generate fractals. After thinking for a bit, I realized it would be easier to write the SQL queries directly than it would be to write a compiler to SQL. That's how the fractal talk came about.
After I gave that talk, I revisited the idea of compiling to SQL. After playing around with for a bit, I discovered it wouldn't be too hard to write a programming language interpreter in SQL which is how this talk came about.
If you have any questions, feel free to ask.
[0] https://www.youtube.com/watch?v=xKoYIvMFnoQ
[1] https://malisper.me/generating-fractals-with-postgres-escape...