I am sure you have figured out a solution by now.If not , something of this sort should work.
SELECT
CUSTOMER,
MIN(start_date) AS start_d,
MAX(end_date) AS end_d,
RANK() OVER(PARTITION BY CUSTOMER ORDER BY end_d DESC) AS rnk QUALIFY rnk=1
FROM
(
SELECT
CUSTOMER,
start_date,
end_date,
SUM(CASE WHEN start_date - prev_end_date > 1 THEN 1 ELSE 0 END) OVER
(PARTITION BY CUSTOMER
ORDER BY start_date
ROWS UNBOUNDED PRECEDING) AS grp
FROM
(
SELECT
CUSTOMER,
start_date,
end_date,
MIN(end_date) OVER
(PARTITION BY
ORDER BY end_date
ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING) AS prev_end_date
FROM table
) dt
) dt
GROUP BY CUSTOMER, grp
I am sure you have figured out a solution by now.If not , something of this sort should work.
SELECT
CUSTOMER,
MIN(start_date) AS start_d,
MAX(end_date) AS end_d,
RANK() OVER(PARTITION BY CUSTOMER ORDER BY end_d DESC) AS rnk QUALIFY rnk=1
FROM
(
SELECT
CUSTOMER,
start_date,
end_date,
SUM(CASE WHEN start_date - prev_end_date > 1 THEN 1 ELSE 0 END) OVER
(PARTITION BY CUSTOMER
ORDER BY start_date
ROWS UNBOUNDED PRECEDING) AS grp
FROM
(
SELECT
CUSTOMER,
start_date,
end_date,
MIN(end_date) OVER
(PARTITION BY
ORDER BY end_date
ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING) AS prev_end_date
FROM table
) dt
) dt
GROUP BY CUSTOMER, grp