I'm trying to write a piece of SQL that looks at 2 outcomes -- either "Yes" or "No" -- and assigns the more favorable of the 2 ("Yes") when a memberID comes up multiple times in a search.
I think it should be straightforward and I checked solutions but here is what I have and cannot get right.
Any help is much appreciated!
--CASE WHEN COUNT(ID) <> 1 THEN Outcome_Met = 'YES' END as CorrectNum,
FROM #temp_memID tp --where have pulled needed contact info about member
HAVING count(RID) > 1
GROUP BY RID, Numerator_Met