• Yep. A CTE can be referenced multiple times inside of the statement immediately following it, but it can't be referenced by multiple statements within the query.

    you mean it can be used only once inside an inner join and that's all the problem?