Skip to content
Advertisement

Row lumping, cycle dates

I want to look at the lead type and if that type is the same for that row then merge in those dates to fit within one row.

I have the below table:

Expected Results:

How can I get my output to look like the expected results?

I have tested withlead lag rank and case expression but nothing worthy of adding here. Am I on the right path?

Advertisement

Answer

This is a gaps-and-islands problem. One option for solving it through contribution of row_number() analytical function :

Demo

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement