One thing that I am always looking for in a new "reusable", "composable" SQL tool is reuse of the same analytical queries across different source tables. My litmus test: I have a table "people" with the columns "people.firstname", "people.lastname", and a table "persons" with the columns "persons.firstname", "persons.lastname". I now want to create a query that gives me the "fullname" (".firstname" + " " + ".lastname…
If I'm understanding your intent correctly, I think you could do that with Zillion. https://github.com/totalhack/zillion Disclaimer: been sidetracked by an acquisition at my day job this year, intend to put more time into this project soon, but I use it in production to great effect.
I'm looking for a more programming language agnostic solution that tools like this (e.g. also PRQL, Malloy) usually offer.