Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 57 characters in body
Source Link
Carsten Massmann
  • 28.4k
  • 3
  • 25
  • 49

Try this:

select team, count(distinct Name) as Players, sum(won) Winners from (select distinct * from test) tst group by team 

You can test it here: http://rextester.com/QATLK24197

Try this:

select team, count(distinct Name) as Players, sum(won) Winners from (select distinct * from test) tst group by team 

Try this:

select team, count(distinct Name) as Players, sum(won) Winners from (select distinct * from test) tst group by team 

You can test it here: http://rextester.com/QATLK24197

Source Link
Carsten Massmann
  • 28.4k
  • 3
  • 25
  • 49

Try this:

select team, count(distinct Name) as Players, sum(won) Winners from (select distinct * from test) tst group by team