This is week 3 assignment for Device to Database
select * from /.*/ where location = 'outside' order by time DESC limit 1
select min(value), location from temperature where time >= '2018-01-01' and time < '2019-01-01'
select min(value), max(value) from temperature where time > '2018-10-07T00:00:00Z' and time < '2018-12-31' and location = 'rootcellar' group by time(1w, 4d)
select time_bucket('1 week', recorded_at::timestamp) as week, min(reading) as min_read, max(reading) as max_read from sensor_data where recorded_at between '2018-10-01' and '2018-12-31' and device = 'rootcellar' and measurement = 'temperature' group by week;