If the protocol_opening_date of different protocols are within 15 days of each other, i need to show them as one protocol in another column named expected start date.
I don't know how to copy my table here as it looks but i'll try to explain as much as i can.
So let's say if one protocol has the start_date of 24.01.2018 and end_date of 30.01.2018 and an other one has start_date of 25.01.2018 and end_date of 10.02.2018
I need to display them as a different protocol with a start_date of 24.01 and end_date of 10.02 because they are 15 days within each other.
Another big issue is that i don't have a clue how to compare these two protocols with a third or fourth one. Because even if there is more than 2 protocols in the same date interval, i don't know how to compare them to each other.
Edit: I added a portion of the table, same colors are the protocols that's been combined into one protocol. Beklenen_baslangıc == expected_start_date