title: Query in Oracle for running sum
body: <p>I need to pull the result set with sum of the previous record and current record.</p>
  
  <p><strong>Logic</strong></p>
  
  <p>My table is having one key column C1 and a numeric column C2. I need a result like below example. I need 3 columns as the out put out which 1 columns is with running sum. First two columns are same as source with the thrid columns but </p>
  
  <ul>
  <li>The first record of C3 = first record C2. </li>
  <li>Second record C3 = "First Record C2 + Second Record C2";</li>
  <li>Third record C3 = "First Record C2 + Second Record C2 + Thrid Record C2"</li>
  </ul>
  
  <p>and it should continue for all the records.</p>
  
  <p><strong>Ex.</strong>
  I have one source table like </p>
  
  <pre><code>C1     C2
  ---------
  a       1
  b       2
  c       3
  </code></pre>
  
  <p>I Need output like below</p>
  
  <pre><code>C1   C2   C3
  -------------
  a    1    1
  b    2    3
  c    3    6
  </code></pre>