Good Evening and sorry for the not very descriptive title. I am not sure how exactly to word my issue for a title.

I have a large amount of data that I would like to cut down to the relevant panel part. So there is a variable (in the code below it is sa0110) that indicates if the household was in the last wave too and the number in the sa0110 is the id of the household in the first wave. The variable survey indicates if the information is from wave 1 or wave 2.

So in the example below one can see that household 234 and 456 were in both wave 1 and 2. Households 123, 345, 567, 678, 789 and 890 were not. So I would like to eliminate all these households out of the data so I would only have household that only appear in either wave 1 or 2, in the example below that would be 234 and 456. However 234 and 456 also are in wave 1 so I am not sure sure how I would keep these observations in wave 1 and in wave 2 while eliminating only those observation which household only appear in one wave. How would I do this?

The variable implicate is just an indicator of the 5 multiple imputation and the original data point.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte survey int id byte implicate int sa0110
1 123 0   .
1 123 1   .
1 123 2   .
1 123 3   .
1 123 4   .
1 123 5   .
1 234 0   .
1 234 1   .
1 234 2   .
1 234 3   .
1 234 4   .
1 234 5   .
1 345 0   .
1 345 1   .
1 345 2   .
1 345 3   .
1 345 4   .
1 345 5   .
1 456 0   .
1 456 1   .
1 456 2   .
1 456 3   .
1 456 4   .
1 456 5   .
1 567 0   .
1 567 1   .
1 567 2   .
1 567 3   .
1 567 4   .
1 567 5   .
1 678 0   .
1 678 1   .
1 678 2   .
1 678 3   .
1 678 4   .
1 678 5   .
1 789 0   .
1 789 1   .
1 789 2   .
1 789 3   .
1 789 4   .
1 789 5   .
1 890 0   .
1 890 1   .
1 890 2   .
1 890 3   .
1 890 4   .
1 890 5   .
2 234 1 234
2 234 2 234
2 234 3 234
2 234 4 234
2 234 5 234
2 234 0 234
2 456 1 456
2 456 2 456
2 456 3 456
2 456 4 456
2 456 5 456
2 456 0 456
end