Q&A for professional and enthusiast programmers
;with cte as (
'https://stackoverflow.com/users/' + cast(U.id as varchar) StackOverflowProfile,
from Posts P
join Users U on U.id = P.OwnerUserId
upper(U.Location) like '%CAPE TOWN%'
rank() over (partition by null order by cte.InteractionCount desc) InteractionCountRank