I have to optimize the below query i m trying to implement cte but have no clue how to
declare @Days int set @Days=600 ------------------> set no of T-days for the