0

let say i have table song like this

artist          year    total_count_song
------          ----    ---------
led zepellin    1994    10
led zepellin    1995    9
the beatles     1994    6
the beatles     1995    5

then i want table pivot like this, but im using mysql so i try to use case but not work.

artist          1994     1995
------          ----     ----   
led zeppelin    10       9
the beatles     6        5

im totaly new at pivot sql, then i know mysql not support pivot then using case. but so many try at that i was stuck.

dipretelin
  • 49
  • 5

0 Answers0