title: SQL using sum(days)
body: <p>My question is in regards to using a function sum(days) and reusing it within my query. </p>
  
  <pre><code>select
    new_client, 
    sum(days) as effort
  from actuals
  where week &gt;='01/01/2016' 
    and type is null 
    and sum(days) = 0
  group by new_client
  order by effort desc
  </code></pre>
  
  <p>I know this doesn't work. I was wondering how one would do the above.</p>