From af0afb44f66dcd931a71bb4bc66a2c62d7ed93c8 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Sun, 12 Feb 2023 11:22:19 +0100 Subject: [PATCH] fix --- queries01.sql | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/queries01.sql b/queries01.sql index c94fb33..bd47367 100644 --- a/queries01.sql +++ b/queries01.sql @@ -58,4 +58,16 @@ with day_avg group by t; - + +-- 12-Uhr-Werte +select + date_trunc('day', time)::date as day, + avg(temperature)::numeric(10,0) as temperature + from room_climate_measurement_t + where + category = 'Outdoor' and + location = 'Outdoor' and + extract('hour' from time) = 12 and + extract('year' from time) = 2023 + group by day + order by day;