How to write a "running sum" report via sql*plus ??

From: feib <agi_at_feib.com.tw>
Date: Sat, 8 Apr 2000 15:47:12 +0800
Message-ID: <MPG.135964d8a531805b989680_at_news.gcn.net.tw>



[Quoted] Hello,everyone    

   Is it possible to generate a "running sum report" via sql*plus ??    for example,    

   product_id price

  • ------- item1 100 item2 120 item3 130

   How to write the script to generate the report like follows ?

    product_id              price            running_sum
   --------------           --------          -----------------
      item1                   100                 100
      item2                   120                 220 (item1+ item2)
      item3                   130                 350 (item1+ item2+ item3)

   ......       
   

    
Received on Sat Apr 08 2000 - 09:47:12 CEST

Original text of this message