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;