1 comments
We stumbled across much the same thing building out a query layer of composable join clauses. In previous efforts at something similar, I've used CTEs, but found the ergonomics worse because the query layer had to differentiate between cte clauses and regular ones.