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