title: MySQL SELECT MAX in equation
body: <p>What I'm attempting to do find values in a table which are less than the MAX of another field, minus a numeric value. Eg:</p>
  
  <pre><code>   ...WHERE some_table.value_1 = 0 AND another_table.value_2 &lt;= (SELECT MAX(another_table.value_3) - 5) ORDER BY...
  </code></pre>
  
  <p>However, this is not working! My joins are all fine, and the query runs without the 2nd part of the WHERE statement, but if you'd like to see the rest of the code for more info, let me know!</p>
  
  <p>Cheers!</p>
  
  <p>Sparkles*</p>
  
  <p>ps all the values are integers</p>