title: SQL query by adding two columns in where clause?
body: <p>I have a database table that contains two scores:</p>
  
  <ul>
  <li>scoreA</li>
  <li>scoreB</li>
  </ul>
  
  <p>I am trying to make a SQL query by adding these two values, such as</p>
  
  <pre><code>SELECT *,(scoreA+scoreB) as scoreC FROM data WHERE scoreC &gt; 100 ORDER BY scoreC DESC
  </code></pre>
  
  <p>However, it shows an error:</p>
  
  <pre><code>ERROR: Unknown column 'scoreC' in 'where clause'
  </code></pre>
  
  <p>Is there any way to work around for this?</p>
  
  <p>P.S. the reason I don't add a new column for scoreC is because scoreA/scoreB are updated continuously by other cron jobs and if I want to calculate scoreC, I need to make extra queries/updates for scoreC, which I would like to avoid to save system resources. However, if it is the only way to calculate scoreC by another cron job, I am also ok with it if it's the only solution. Thanks.</p>