Hello,
I have a table that has two fields - email address and player name. All email addresses have the same number of players (in the sample database I provide it is two - in my live table it is 12). I want to see if any two email addresses have the same 2 (or 12) players.
In the sample database, both
emai1@test.com and
email2@test.com have the same two players, while
email3@test.com does not. Is there a way to have the email addresses returned showing which email addresses match on both (or all 12) of the players?
If so, is there a way to show how many match on 11, 10, 9, etc. of the players.
The SQL test code is:
CREATE TABLE `teams` (`email` varchar(100) NOT NULL,`player` varchar(100) NOT NULL);INSERT INTO `teams` (`email`, `player`) VALUES('
email1@test.com', 'Ryan Zimmerman'),('
email1@test.com', 'Adam Dunn'),('
email2@test.com', 'Ryan Zimmerman'),('
email2@test.com', 'Adam Dunn'),('
email3@test.com', 'Ryan Zimmerman'),('
email3@test.com', 'Mike Stanton');