This exactly the comment I was going to leave. If I get past one sub query, I will refactor to CTE.
Maintainability is not relevant to ad-hoc analytics queries. That may be dealt with once the correct query has been determined from sufficient iteration.