You are viewing a single comment's thread. Return to all comments →
SELECT Task_ID, Start_Date, End_Date, DATE_SUB(Start_Date, INTERVAL ROW_NUMBER() OVER (ORDER BY Start_Date) DAY) AS PGroup FROM Projects ) SELECT MIN(Start_Date) AS PStart, MAX(End_Date) AS PEnd FROM PSEQ GROUP BY PGroup ORDER BY DATEDIFF(MAX(End_Date), MIN(Start_Date)), MIN(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 →