4,707 questions
The error message is pretty clear isn't it? Your CTE returns a string and then you are trying to perform an arithmetic operation on a string. I mean what is the sum of New York, London Paris and Munich?
I think you should ask yourself why you put in that convert in the CTE in the first place.