Knime find a match of a value for first column in second column, within multiple rows

Hi All,

I am stuck almost whole day and need to deliver this end of the day. Any help in figuring out the logic is very helpful.

I have employee whose pay dates for year 2023 are available in Pay_date column.

I have to calculate his pay_date from his first contribution date.

So I need an output like this

The logic is for each SSN :

Determine first pay date, using the date that is on-or-before the first contribution date

How do i do and get single row out of it. Group by doesn’t have option to use a condition

In this example it is the last Pay_date, but it could be anywhere in the middle or sometimes it could be the first pay date too