title: Mysql select just one row per day in interval
body: <p>I have a mysql DB with multiple that contains data like this.
  <a href="http://sqlfiddle.com/#!9/f084c" rel="nofollow noreferrer">http://sqlfiddle.com/#!9/f084c</a></p>
  
  <pre><code>CREATE TABLE `datos` (
    `id` int(11) NOT NULL,
    `fecha` datetime NOT NULL,
    `temperatura` tinyint(4) NOT NULL
  ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  
  INSERT INTO `datos` (`id`, `fecha`, `temperatura`) VALUES
  (1874, '2017-05-20 01:56:40', 20),
  (1875, '2017-05-20 01:56:51', 20),
  (1876, '2017-06-18 23:32:49', 17),
  (1877, '2017-06-18 23:34:50', 17),
  (1878, '2017-06-18 23:36:51', 17),
  (1879, '2017-06-18 23:38:52', 17),
  (1880, '2017-06-18 23:46:02', 16),
  (1881, '2017-06-18 23:47:12', 17),
  (1882, '2017-06-22 01:06:27', 21);
  </code></pre>
  
  <p>I want to select just one value of a day during a 30 day interval, to have a result like this</p>
  
  <pre><code>2017-06-22 01:06:27 21
  2017-06-18 23:47:12 17
  2017-05-20 01:56:51 20
  </code></pre>
  
  <p>I have selected the entire interval using </p>
  
  <pre><code>SELECT * FROM `datos` WHERE fecha &gt;= '2017-06-22 01:06:27' - INTERVAL 30 DAY
  </code></pre>
  
  <p>But i have not managed to just select one value per day instead of all of them.
  Would appreciate the help</p>