1) In CLAIMS table, by selecting those MemberIDs with year=Y2 , the members are those filed claims in Y2.
(also see Year definition).
2) DaysInHospital_Y2 contains only those eligible members in Y2.
If the above understanding is correct, then the MemberID in 1) should match with those in 2). But this is not true.