I have a CTE that results in a pivot, now I want to bring in the results to another query. I can't seem to get the pivot table alias correct so I can tie it in. Here is what I have and am trying to do.
[code la
[code la