title: I want to find first and last values of two columns along with my query
body: <pre><code>SELECT Min(`low`), 
         Max(`high`), 
         `snapshotdatetime` 
  FROM   `historical_intraday_price` 
  WHERE  Unix_timestamp(`snapshotdatetime`) &gt;= Unix_timestamp('2016-09-01 09:20:00.000000 ') 
  GROUP  BY Unix_timestamp(`snapshotdatetime`) DIV 180 
  </code></pre>
  
  <p>This is my query  i want first value of field name Open and last value of field name Close with this query.
  its smthng like </p>
  
  <pre><code>SELECT First(`open`), 
         Last(`close`), 
         Min(`low`), 
         Max(`high`), 
         `snapshotdatetime` 
  FROM   `historical_intraday_price` 
  WHERE  Unix_timestamp(`snapshotdatetime`) &gt;= Unix_timestamp('2016-09-01 09:20:00.000000     ') 
  GROUP  BY Unix_timestamp(`snapshotdatetime`) DIV 180 
  </code></pre>
  
  <p>but  FIRST(<code>Open</code>),LAST(<code>Close</code>) are wil not work,anybody have any idea,please help</p>