我有一个SQL Server表,该表代表玩家的下注。
如果我执行此查询:
SELECT MOVES.ID, MOVES.ROUND, MOVES.VALUE, PLAYER.NAME
FROM MOVES
JOIN PLAYER
ON MOVES.PLAYER_ID = PLAYER.ID
ORDER BY ROUND
我可以看到以下结果:
ID ROUND VALUE NAME
1 1 $100 JOHN
2 1 $120 DOE
3 1 $190 LUCILE
4 2 $50 JOHN
5 2 $220 LUCILE
6 2 $0 DOE
...
我想进行查询以将每个回合表示为一行,并且玩家在该行上下注:
ROUND JOHN LUCILE DOE
1 $100 $190 $120
2 $50 $220 $0
...
我该怎么做?