Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

String aggregation

793686Sep 9 2010 — edited Sep 9 2010
hi

I want to aggregate string values from my table. Following are the details

create table emp (idd integer , name varchar(20), position float, qty float);

insert into emp values(1,'abc',500,600);
insert into emp values(1,'def',500,700);
insert into emp values(1,'ghi',500,800);
insert into emp values(2,'sss',200,900);
insert into emp values(3,'aaa',400,1100);

I want to make a query that can give the ouput below

idd name_group sum(position) sum(qty)
1 abc,def,ghi 1500 2100
2 sss 200 900
3 aaa 400 1100


I am using oracle 9

Please help

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2010
Added on Sep 9 2010
7 comments
685 views