Wow sqlite has CTE queries!
This improves readability a lot.

I've used CTE queries in clickhouse before and it was a charm. Especially in combination with our nasty python f-string formatting back then.

Sqlx does not seem to like the single row paradigm too much though.
But for now implementing the From trait into transfer objects isn't too bad. At least the query is precise and easy to understand.

#rust #sqlx #sqlite #cte