Automated SQL generation

This page is a capture in the next bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.

At present we are manually creating the SQL. We should be able to do it from sqlgen.

Emacs 29.1 (Org mode 9.6.6)