Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
group for team members and winners in sql-server
with test as ( select 'X' team,'Andy' Name, 1 Won union all select 'X','Cara',1 union all select 'X','Cara',1 union all select 'X','Eric',0 union all select 'X','Eric',0 union all select 'X','Eric',0 union all select 'X','Eric',0 union all select 'Y','Bill',0 union all select 'Y','Dave',0 union all select 'Y','Dave',1 union all select 'Y','Dave',1 ) select team, count(distinct Name) as Players, sum(won) Winners from (select distinct * from test) tst group by team
run
|
edit
|
history
|
help
0
Stored procedure ex1
second Query
Task_2_Final
BC160401693
add loopback linked server
SS mysqlsvr 2014 practice
zani
Greatest_N_Per_Group
SO_20171230_SqlServer
Print 10 records