Groupby与count和逗号分隔列

时间:2017-11-02 18:28:23

标签: count comma

我有来自CTE输出的以下记录

Component      BOM    Count     Type        MaterialDescription
6773    360063  21      PUR         Capacitor Run 5.000 
6773    360064  21      PUR         Capacitor Run 5.000 
6773    360065  21      PUR         Capacitor Run 5.000
7768    155593  20      PUR         Cable Tie L=185.674mm Black

输出应为

Component   BOM                     Count   TYPE             Desc
6773    36003,36004,36005   21      Capacitor Run 5.000         Capacitor Run 5.000 
7768    155593  20          PUR      Cable Tie L=185.674mm

0 个答案:

没有答案