面试的一个SQL语句查询的问题

面试的一个SQL语句查询的问题,大家帮忙看下
ID
1  张三  语文 80
1  张三  数学 90
1  张三  英语 70
2  李四  语文 89
2  李四  数学 60
2  李四  英语 90

使用SQL语句实现下列结果
ID name  chinese math english
  1  张三   80      90   70
  2  李四   89      60   90

我这个绝对行,记得给分哦, 呵呵

[code="java"]
select id,name,
max(case kemu when '语文' then fenshu else 0 end) '语文',
max(case kemu when '数学' then fenshu else 0 end) '数学',
max(case kemu when '英语' then fenshu else 0 end) '英语'
from test
group by id,name;
[/code]

select ID name chinese,math,english from
table1 A left join
table1 B on B.kemu="语文
left join
table1 C on C.kemu="数学"
left join
table1 D on D.kemu="英语"
group by ID
试一下吧