📅  最后修改于: 2022-03-11 15:04:58.254000             🧑  作者: Mango
select *
from
(
select game, player, goals
from yourtable
) src
pivot
(
sum(goals)
for player in ([John], [Paul], [Mark], [Luke])
) piv
order by game