title: SQL Cumulative Count
body: <p>I have table with departments. I need to count how many people are within which dept. This is easily done by</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT DEPT,
         COUNT(*) as 'Total'
      FROM SR
      GROUP BY DEPT;
  </code></pre>
  <p>Now I need to also do cumulative count as below:</p>
  <p><img src="https://i.stack.imgur.com/e82Kq.png" alt="enter image description here" /></p>
  <p>I have found some SQL to count running total, but not case like this one. Could you provide me some advice in this case, please?</p>