@StaintGr8, please notice how you can run the inner queries simply by highlighting then and hitting F5 (excluding the correlation... can't do that with the CTE you have at the moment).
@StaintGr8, please notice how you can run the inner queries simply by highlighting then and hitting F5 (excluding the correlation... can't do that with the CTE you have at the moment).