我有一张如下表
column_date | color | qty | supplier | location
1 June 2012 | red | 2 | XY | A wing
1 June 2012 | red | 1 | AB | A wing
1 June 2012 | blue | 4 | CD | A wing
1 June 2012 | blue | 1 | XY | B wing
2 June 2012 | yellow| 13 | CD | B wing
2 June 2012 | green | 45 | CD | A wing
2 June 2012 | blue | 32 | AB | A wing
2 June 2012 | red | 37 | XY | A wing
2 June 2012 | red | 2 | XY | B wing
2 June 2012 | red | 1 | AB | A wing
2 June 2012 | blue | 4 | CD | A wing
3 June 2012 | red | 1 | AB | B wing
3 June 2012 | blue | 4 | CD | A wing
3 June 2012 | blue | 1 | XY | B wing
3 June 2012 | yellow| 13 | CD | B wing
3 June 2012 | green | 45 | CD | A wing
3 June 2012 | blue | 32 | AB | A wing
我想有一个像下面这样的输出。我不确定在查询中是否可能,如果可能的话,我不知道如何开始。我正在寻找您的建议或可能的查询来显示这样的输出。谢谢你。
Supplier
Date | XY | CD | AB
| A wing | B wing | A wing | B wing | A wing | B wing
1 June 2012 | 2 | 1 | 4 | 0 | 1 | 0
2 June 2012 | 37 | 2 | 49 | 13 | 33 | 0
3 June 2012 | 0 | 1 | 49 | 13 | 32 | 1
Total | 39 | 4 | 102 | 26 | 66 | 1