SQL Project Planning

  • + 0 comments

    My solution in MySQL with no need to change sql_mode:

    select Start_Date, min(End_Date) from (select Start_Date from Projects where Start_Date not in (select End_Date from Projects)) s cross join (select End_Date from Projects where End_Date not in (select Start_Date from Projects)) e where Start_Date < End_Date group by Start_Date order by DATEDIFF(min(End_Date),Start_Date),Start_Date;