用SQL統計的問題
有一表person,存放的是全校的学生每月月考的成绩,课程有语文,数学,物理,化学,历史,政治等!现在到了年底,想要做一表,我这里VB用的是水晶报表, 
 表里面要体现学生个人从一月到十二月的每次考试的各门课程的成绩,   
                         1月      2月      3月      4月      5月         6月         7月 
 语文            80            50            62            58         25            68               89 
 数学            75            89            59            48         47            56               68 
 物理            65            59            58            78         59            79               69 
 化学            89            89            68            79         26            12               23   
 就象这样,这是我想的样式,不知道各位还有好的样式没, 
 表里面有学号,课程名,成绩,月份,等字段,怎么分月把学生的成绩象上面这样写出来,sql该怎么写 
------解决方案--------------------select 学号,课程号, 
        max(case when 月份 = 1 then 成绩 else 0 end) as 1月, 
        max(case when 月份 = 2 then 成绩 else 0 end) as 2月, 
        .... 
        max(case when 月份 = 12 then 成绩 else 0 end) as 12月 
 from person 
 group by 学号,课程号
------解决方案----------------------try   
 select 课程名, 
 1月=max(case when 月份=1 then 成绩 end), 
 2月=max(case when 月份=2 then 成绩 end), 
 3月=max(case when 月份=3 then 成绩 end), 
 4月=max(case when 月份=4 then 成绩 end),   
 ...   
 11月=max(case when 月份=11 then 成绩 end), 
 12月=max(case when 月份=12 then 成绩 end) 
 from person 
 where 学号= ' ' 
 group by 课程名
------解决方案--------------------迟来一步,我只能大同小异:(   
 SELECT 学号,课程名, 
 max(case 月份 when 1 then 成绩 end) as 1月, 
 max(case 月份 when 2 then 成绩 end) as 2月, 
 max(case 月份 when 3 then 成绩 end) as 3月,   
 ...     
 max(case 月份 when 12 then 成绩 end) as 12月 
 FROM person 
 GROUP BY 学号,课程名