Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql pivot table

select *
from
(
  select game, player, goals
  from yourtable
) src
pivot
(
  sum(goals)
  for player in ([John], [Paul], [Mark], [Luke])
) piv
order by game
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql #pivot #table
ADD COMMENT
Topic
Name
2+4 =