I have the following table:
uid | key | email
-----------------
1 | 1 | test@test.com
2 | 2 | test@test.com
3 | 3 | test@test.com
4 | 4 | test@test.com
5 | 4 | test@test.com
6 | 4 | test@test.com
7 | 6 | abce@test.com
8 | 7 | defg@test.com
I'd like to grab all of the rows with distinct key but repeating email values
the result should look like:
uid | key | email
-----------------
1 | 1 | test@test.com
2 | 2 | test@test.com
3 | 3 | test@test.com