Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL-statement
Hi:
If I have understood ok, your table has the next values:
Lines Qty
-------- --- -
1 4 2 4 5 2
You can do the next:
select lines,qty,qty*100/(select sum(qty) from table) percent,
(select sum(qty*100/(select sum(qty) from table)) from table i2 where i2.lines<=table.lines) accumulatedfrom table
I hope it's usefull to you.
Regards,
Isa
Received on Thu Sep 01 2005 - 04:42:36 CDT