Hi All
I have to create multiple rows to single column but shows multiple rows. Please guide.
Input:
Cust_id Account_id Amt Inv_code Center
111 185326 85000 A180 7000
111 228965 25000 A160 7000
111 896423 90000 B580 7000
111 228965 500000 A160 7000
975 855685 55000 R444 9000
975 585456 75000 T150 9000
Buketing is based on total sum of Amt: ≤1M then '<1M', >1M and <5M then '>1M & <5M' , ≥5M Then ' ≥5M'
Output:
Cust_id Account_id1 Amt_1 Inv_code_1 Center Account_id2 Amt2 Inv_code2 Account_id3 Amt3 Inv_code3 Bucket Count
111 185326 85000 A180 7000 228965 525000 A160 896423 90000 B580 >1M 4
975 855685 55000 R444 9000 585456 75000 T150 9000 null null <1M 2
Thanks
Ace