I have a table with only two fields (in SQLite3, but I can use PostgreSQL or SQLServer), that have a datetime and a int value (temperature of a room), like below:
+-----------------------------------+
| Table: Temperature |
+---------------------+-------------+
| Date | Temperature |
+---------------------+-------------+
| 2017-03-03 15:10:00 | 25 |
| 2017-03-03 15:11:00 | 25 |
| 2017-03-03 15:12:00 | 25 |
| 2017-03-03 15:13:00 | 25 |
| 2017-03-03 15:14:00 | 26 |
| 2017-03-03 15:15:00 | 26 |
| 2017-03-03 15:16:00 | 26 |
| 2017-03-03 15:17:00 | 26 |
| 2017-03-03 15:18:00 | 26 |
| 2017-03-03 15:19:00 | 27 |
| 2017-03-03 15:20:00 | 27 |
+---------------------+-------------+
Like in the example, I have a temperature at every minute.
This is used to monitor the temperature for other systems, but I like to show this in a web page too, using python (flask), but in the web page it's not important to show the temperature at every minute, but at every 10 minutes or at every hour is better.
How to make a select to show only temperatures at every 10 minutes (or another interval)? So my results must be:
+-----------------------------------+
| Table: Temperature |
+---------------------+-------------+
| Date | Temperature |
+---------------------+-------------+
| 2017-03-03 15:10:00 | 25 |
| 2017-03-03 15:20:00 | 27 |
+---------------------+-------------+