Managed to find the solution a similar solution in "STACK OVER FLOW" and then had to modify it slightly. So it works .. Here you go
;WITH T AS
(
SELECT *,
DENSE_RANK() OVER (ORDER BY EligMonth) - EligMonth AS Grp
FROM #t
),
CONSECUTIVE_MONTHS_TOGETHER as
(
SELECT
BeneficiaryID,
MIN(EligMonth) AS RangeStart,
MAX(EligMonth) AS RangeEnd,
MAX(EligMonth) - MIN(EligMonth) as DIFF
FROM T
GROUP BY BeneficiaryID, Grp
)
Select * FROM CONSECUTIVE_MONTHS_TOGETHER WHERE DIFF > 2 --( See Explanation )
/*
This solution works when the numbers are in a sequence ( that is the case with my example )
So if you had any 3 months of consecutive coverage the difference between the largest and smallest must be > 2 -- OR ( >= (3) )
*/
Here is the internet article that helped me....
https://stackoverflow.com/questions/7608370/how-can-i-check-a-group-of-numbers-are-consecutive-in-t-sql
CASE CLOSED ... NO FURTHER HELP NEEDED. Have a wonderful day .