列我有一个表包含材料类型:的Oracle SQL斯普利特型
id type mat_number description count
------------------------------------------------
a mat_1 123456 wood type a 5
a mat_2 333333 plastic type a 8
b mat_1 654321 wood type b 7
c mat_2 444444 plastic type c 11
d mat_1 121212 wood type z 8
d mat_2 444444 plastic type c 2
d mat_2 555555 plastic type d 3
与SQL我想如下创建列表:
id mat_1 desciption count mat_2 description count
-------------------------------------------------------------------
a 123456 wood type a 5 333333 plastic type c 8
b 654321 wood type b 7 null
c null 444444 plastic type c 11
d 121212 plastic type c 8 444444 plastic type c 2
d null 555555 plastic type c 3
这有可能与没有太多精力?
你的努力如何? – Mihai
根据你想要哪条规则获得'd'的行?为什么'121212 444444',但对于第二个mat_2,你有null null 555555?为什么不以'121212 444444','121212 555555'为例? – Tatiana
,因为这是客户的要求。 – user