title: Group by rows order by min price first
body: <p>I have a table 'terms':  </p>
  
  <pre><code>([id], [t_id], [d_start], [d_end], [price], [departure_from])  
  </code></pre>
  
  <p>with values:  </p>
  
  <pre><code>(12,10, 2018-5-5, 2018-5-15, 95, london),  
  (11,10, 2018-5-5, 2018-5-15, 60, london),  
  (10,10, 2018-5-5, 2018-5-15, 90, london),  
  ( 9, 10, 2018-5-5, 2018-5-15, 90, prag),  
  ( 8, 10, 2018-5-5, 2018-5-15, 85, prag),   
  ( 7, 10, 2018-5-5, 2018-5-15, 70, prag),   
  ( 6, 10, 2018-6-8, 2018-6-18, 30, london),    
  ( 5, 10, 2018-6-8, 2018-6-18, 20, london),   
  ( 4, 10, 2018-6-8, 2018-6-18, 90, london),   
  ( 3, 10, 2018-6-8, 2018-6-18, 90, prag),  
  ( 2, 10, 2018-6-8, 2018-6-18, 10, prag),   
  ( 1, 10, 2018-6-8, 2018-6-18, 70, prag); 
  </code></pre>
  
  <p>and  I want to group by d_start,d_end,departure_from with order by price and I want to order by price first.<br>
  I have query:  </p>
  
  <pre><code>(SELECT * FROM 
    (SELECT * FROM terms 
     WHERE t_id=10 ORDER BY price) t
  GROUP BY d_start,d_end,departure_from ORDER BY d_start) 
  </code></pre>
  
  <p>Result I want:  4 rows with min price :<br>
  (11,10, 2018-5-5, 2018-5-15, 60, london),<br>
  ( 7, 10, 2018-5-5, 2018-5-15, 70, prag),<br>
  ( 5, 10, 2018-6-8, 2018-6-18, 20, london),<br>
  ( 2, 10, 2018-6-8, 2018-6-18, 10, prag),  </p>
  
  <p>My first question there. Thank you for any help. </p>
  
  <p>I found result that work for me:<br>
  (SELECT * FROM 
    (SELECT * FROM terms 
     WHERE t_id=10 GROUP BY d_start,d_end,departure_from,price ORDER BY d_start) t
  GROUP BY d_start,d_end,departure_from) </p>
  
  <p>What do you think? It's OK?</p>