SQL Project Planning

  • + 0 comments

    with cte as ( select *,Start_Date - row_number() over(order by End_Date) as rn from Projects ) select min(Start_Date), max(End_Date) from cte group by rn order by max(End_Date)-min(Start_Date), min(Start_Date)