You are viewing a single comment's thread. Return to all comments →
MySQL query
select start_date, date_add(start_date, interval (lead(rn, 1, rn + 1) over (order by end_date) - rn) day) as endn_date from (select task_id, start_date, end_date, datediff(end_date, prev_end_date) as diff, row_number() over() as rn from (select task_id, start_date, end_date, lag(end_date,1, end_date) over (order by end_date) as prev_end_date from projects) temp order by end_date) temp2 where diff !=1 order by datediff(endn_date,start_date) asc, start_date asc
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 →
MySQL query