请问要得到这样的结果表该怎么书写sql语句

请教要得到这样的结果表该如何书写sql语句
表结构:
A表:工号    姓名     奖金       月份
123     张三    1000    201501
223     李四    2000    201501
333     王五    1500    201501
123     张三    6000    201502
223     李四    3000    201502
333     王五    1500    201502
123     张三    2000    201503
223     李四    4000    201503
333     王五    5500    201503 
*******************************************************
请教如何书写sql语句,能得到下面的结果表: 
工号      姓名        一月    二月    三月
123           张三         1000      6000     2000
223           李四         2000      3000     4000
333           王五         1500      1500     5500 
***************************************************
如能讲解下更好,谢谢!
------解决思路----------------------
select  工号 , 姓名 ,sum (case when 月份='201501' then 奖金  end) as 一月,
                     sum (case when 月份='201502' then 奖金  end) as 二月,
                     sum (case when 月份='201503' then 奖金  end) as 三月
from A group by 工号 , 姓名
------解决思路----------------------
with b1 (工号,姓名,奖金,月份)as(
select '123','张三','1000','201501' union all
select '223','李四','2000','201501' union all
select '333','王五','1500','201501' union all
select '123','张三','6000','201502' union all
select '223','李四','3000','201502' union all
select '333','王五','1500','201502' union all
select '123','张三','2000','201503' union all
select '223','李四','4000','201503' union all
select '333','王五','5500','201503'



select 工号,姓名, [201501] as [一月],[201502] as [二月],[201503] as[三月] from b1 
pivot (max(奖金) for 月份 in([201501],[201502],[201503])) a order by 工号