You are viewing a single comment's thread. Return to all comments →
CTE solution MS SQL:
with unique_start as ( select a.start_date from projects A left join projects t on a.start_date = t.end_date where t.end_date is null ), unique_end as ( select a.end_date from projects A left join projects t on a.end_date = t.start_date where t.start_date is null ) select start_date, min(end_date) from unique_start join unique_end on start_date < end_date group by start_date order by datediff(day, start_date, min(end_date)), start_date
Seems like cookies are disabled on this browser, please enable them to open this website
SQL Project Planning
You are viewing a single comment's thread. Return to all comments →
CTE solution MS SQL: