title: Get Min and Max values with one MySQL query with Group BY
body: <p>I've seen similar questions asked here before, but they all seem to be talking about getting only Min <strong>or</strong> Max value. I need to get both, ideally with one query. I can't get my head around the logic how this works in MySQL.<br>
  Example data</p>
  
  <pre><code>+--------+--------+---------+---------+----------+
  |temp_min|temp_max|pressure |condition|dt_txt    |
  +--------+--------+---------+---------+----------+
  |9.27    |9.27    |1021.98  |Rain     |2018-05-15|
  |8.77    |8.77    |1021.22  |Rain     |2018-05-15|
  |9.99    |9.99    |1021.31  |Clear    |2018-05-15|
  |13.86   |13.86   |1021.41  |Clouds   |2018-05-15|
  |12.39   |12.39   |1019.71  |Rain     |2018-05-14|
  |13.42   |13.42   |1020.24  |Rain     |2018-05-14|
  |14.14   |14.14   |1020.41  |Rain     |2018-05-14|
  |9.01    |9.01    |1018.12  |Rain     |2018-05-14|
  |13.94   |13.94   |1020.73  |Rain     |2018-05-14|
  |5.64    |5.64    |1018.42  |Clouds   |2018-05-14|
  |10.65   |10.65   |1021.8   |Clouds   |2018-05-14|
  |8.69    |8.69    |1018.91  |Clouds   |2018-05-14|
  |...     |...     |...      |...      |...       |
  +--------+--------+---------+---------+----------+
  </code></pre>
  
  <p>Logic and common sense would dictate something like this:</p>
  
  <pre><code>SELECT 
      MIN(`temp_min`) AS `temp_min`,
      MAX(`temp_max`) AS `temp_max`,
      `dt_txt`,
      DAYNAME(`dt_txt`) AS `dayname`,
      `pressure`,
      `condition`,
      `dt_txt`
  FROM
      infoboard.forecasts
  WHERE `dt_txt` &gt;= CURDATE()
  GROUP BY `dt_txt`
  ORDER BY `dt_txt` ASC;
  </code></pre>
  
  <p>Result is:</p>
  
  <pre><code>+--------+--------+---------+---------+----------+--------+
  |temp_min|temp_max|pressure |condition|dt_txt    |        |
  +--------+--------+---------+---------+----------+--------+
  |10.65   |9.01    |1018.12  |Rain     |2018-05-14|Monday  |
  |13.86   |9.99    |1021.98  |Rain     |2018-05-15|Tuesday |
  +--------+--------+---------+---------+----------+--------+
  </code></pre>
  
  <p>For <code>2018-05-14</code> min should be <code>8.69</code> and max should be <code>14.14</code><br>
  For <code>2018-05-15</code> min should be <code>8.77</code> and max should be <code>13.42</code></p>
  
  <p>How do I get real min and max values from temp_* columns and what's the logic that drives the correct query?</p>