求助:这样的效果用SQL该怎么实现?
表1有两列:
Year Amount
---- ------
1990 1.1
1990 1.2
1990 1.3
1990 1.4
1991 2.1
1991 2.2
1991 2.3
1991 2.4
要求表1转化为只有1列的表2:
Year 1990
Amount 1.1
Amount 1.2
Amount 1.3
Amount 1.4
Year 1991
Amount 2.1
Amount 2.2
Amount 2.3
Amount 2.4
或者1列的表2这个格式:
Year 1990
Amount 1.1 1.2 1.3 1.4
Year 1991
Amount 2.1 2.2 2.3 2.4