有一张表A 有字段 用户ID,请假类型,请假时间。
id    type    time(hours)
001      1       8
002      2       8
001      2       8
003      3       8做一张报表,显示为
id    type=1    type=2    type=3
001      8         8         0
002      0         8         0
003      0         0         8请问sql怎么写?