Given the following list
t1 = {{5, 5, 50}, {6, 1, 37}, {6, 2, 40}, {6, 3, 45}, {7, 4, 65}, {7, 6, 85}, {8, 1, 65}, {6, 6, 72}, {7, 1, 50}};
I want to find those triples having the same element in the last position. Which results in
{{5, 5, 50}, {7, 4, 65}, {8, 1, 65}, {7, 1, 50}}
I can do it by:
t2 = Select[Tally[t1[[All, 3]]], Last[#] > 1 &][[All, 1]];
Select[t1, MemberQ[#, Alternatives @@ t2] &]
Any ideas for polishing this clumsy code?