Deepak Deepak - 1 year ago 72
SQL Question

Query to find players who represented multiple countries

Sample Table

I would like to run a query from the given table shown in the screenshot to find out either playerids or playernames who have represented multiple countries.For example playerid=1001 have represented more than one country which is 'IND' and 'USA'.
There are some duplicates rows in this table, but please ignore them.

Thanks for your help in advance.

Answer Source

I think you mean this:

SELECT PlayerID, PlayerName
FROM yourTable
GROUP BY PlayerID, PlayerName
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download