title: How to Select rows based on two columns
body: <p>I am trying to select rows based on values of two column,</p>
  
  <p>Here is the structure of Table,</p>
  
  <pre><code>ID | Weight | Page
  ------------------
   1 |  1     | 1
   2 |  2     | 1
   3 |  1     | 2
   4 |  2     | 2
  </code></pre>
  
  <p>Now I want to select all IDs from page1 and all ids from page2 but for page2 weight should be &lt;=1</p>
  
  <p>How can I select those IDs?</p>
  
  <p>Thanx</p>