> CTEs don't solve this problem
They kind of do in my head. "WITH" reads to me exactly like the datasource you are looking for.