-
SQL query problem- group by
Hi,
I am facing an issue with data manipulation with sql query. I am having data as below and I need the output as shown below output.Any help would be of great helkp to me.
ITEM_ID PUR_BY AMOUNT CUST_ID DISCOUNT
1 AB 100 121 5
2 CD 200 121 4
3 EF 120 122 4
4 GH 130 122 3
5 IJ 140 123 4
Output
PUR_BY AMOUNT CUST_ID DISCOUNT
AB-CD 300 121 9
EF-GH 250 122 7
IJ 140 123 4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|