title: How to Increment Total Sum/Count in Row SQL
body: <p>I am having trouble counting the TotalAmount incrementing by however many more number of policies there are iterating through each row.</p>
  
  <p>For Example consider the following code:</p>
  
  <pre><code>SELECT 
    Customer.custno, 
    Customer.enteredDate AS 'Date Entered', 
    COUNT(BasicPolInfo.polid) AS 'Number of Policies', 
    SUM( COUNT(BasicPolInfo.polid)) over() AS TotalAmount    
  FROM Customer 
  INNER JOIN BasicPolInfo ON Customer.custid = BasicPolInfo.custid    
  WHERE BasicPolInfo.polid IS NOT NULL 
    and Customer.firstname IS NOT NULL 
    AND Customer.enteredDate &gt; '1/1/79'    
  GROUP BY Customer.custno, Customer.firstname, Customer.lastname, Customer.entereddate    
  ORDER BY Customer.enteredDate ASC
  </code></pre>
  
  <p>What I would like to see is the TotalAmount Column be added from the Number of Policies iterating through each and every customer.</p>
  
  <p>ex:</p>
  
  <pre><code>21 -- date -- 6 -- 6
  24 -- date -- 13 -- 19
  25 -- date -- 23 -- 32
  29 -- date -- 16 -- 48
  </code></pre>
  
  <p>I could care less for the order of the custno, rather I am more concerned if the total policies are even 159703? There are more than 1000 rows in this SQL.</p>
  
  <p>Please help me how I am able to sum each row from the preceding total sum!</p>