Keeping my previous question open , here's one solution to ur problem.
I came up with this quickly (so there could be better ways of doing it)..
And again if u're using this for a large dataset the queries can be optimised..
-- Scenario 1
select SSN
from #mytemp
where datediff (m,cast(period + '-01' as datetime),getdate()) <=12
group by SSN
having COUNT(SSN) >1
-- Scenario 2
select SSN,planID
from #mytemp
where datediff (m,cast(period + '-01' as datetime),getdate()) <=12
group by SSN,planID
having COUNT(SSN) >1