title: How to fetch the first and last record of a grouped record in a MySQL query with aggregate functions?
body: <p>I am trying to fetch the first and the last record of a 'grouped' record.<br>
  More precisely, I am doing a query like this</p>
  
  <pre><code>SELECT MIN(low_price), MAX(high_price), open, close
  FROM symbols
  WHERE date BETWEEN(.. ..)
  GROUP BY YEARWEEK(date)
  </code></pre>
  
  <p>but I'd like to get the first and the last record of the group. It could by done by doing tons of requests but I have a quite large table.</p>
  
  <p>Is there a (low processing time if possible) way to do this with MySQL?</p>