📜  sql 数据透视表 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:58.254000             🧑  作者: Mango

代码示例3
select *
from
(
  select game, player, goals
  from yourtable
) src
pivot
(
  sum(goals)
  for player in ([John], [Paul], [Mark], [Luke])
) piv
order by game