How to get 1 record based on SK_MEMBER and line of business

I have a scenario where an SK_MEMBER has multiple records with multiple effective dates and expiration dates . based on MonthsLOB field .

I would like to get an output for a single record by finding out min(effectivedate) and max(expiration date) per sk_member per set of MONTHSWITHLOB.

In the attached screenshot, I see sk_member 32 has some plans for MONTHSWITHLOB 1-8 twice and MONTHSWITHLOB 1-5 twice.

I am expecting a output of 3 records with SK_MEMBER, min(EFFECTIVE DATE) , max(EXPIRATION DATE) .

Any help is greatly appreciated.
Sample Input.PNG


smfitguy4129 (BOB member since 2017-09-11)