I work on sql server 2012 and i need to enhance or make this query have good performance
this stored procedure work success but i need to know
when make drop to temp table and cte