SQL Project Planning

  • + 1 comment
    select pro.start_date, (select min(p.end_date) from projects as p 
    where p.end_date not in (select start_date from projects) and p.end_date > pro.start_date) as qqq from projects as pro 
    where pro.start_date not in (select end_date from projects)
    order by datediff(pro.start_date,qqq) desc;