title: SELECT min and max value from a part of a table in MySQL
body: <p>If I want to select min and max values from a whole table I can use this:</p>
  
  <pre><code>SELECT min(price) as min_price, max(price) as max_price FROM `prices`
  </code></pre>
  
  <p>But how to select min and max values from just a part of a table?
  For example, I have 30 rows in a table. I want to select min and max values from first ten rows, then from second ten rows and then form the last 10.</p>
  
  <p>I've tried something like </p>
  
  <pre><code>SELECT min(price) as min_price, max(price) as max_price FROM `prices` LIMIT 0,10
  </code></pre>
  
  <p>but this did not work.</p>
  
  <p>How can I solve this problem with minimum queries?</p>