title: check for same range in postgresql
body: <p>I wanted to check if for one particular student my column (<code>Amount</code>) contains a value less than 10, and if yes, then check if for the same student my column (<code>Amount</code>) is also greater than 10 and update the column <code>new</code> accordingly in PostgreSQL.</p>
  
  <p>MY table:</p>
  
  <p><img src="https://i.stack.imgur.com/Tudv9.jpg" alt="x"></p>
  
  <p>Tried this way but not working</p>
  
  <pre><code>update table t1 set "New"='pass'
  where cast("Amount" as numeric) &lt;= 10 and cast("Amount" as numeric) &gt; 10 
  </code></pre>
  
  <p>The output I'm expecting:</p>
  
  <p><img src="https://i.stack.imgur.com/dkAai.jpg" alt="y"></p>