Sql server cte

shape