diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a77343b --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata +simulation/.venv/ + diff --git a/queries01.sql b/queries01.sql index bd47367..efb71bb 100644 --- a/queries01.sql +++ b/queries01.sql @@ -47,7 +47,7 @@ with category = 'Outdoor' and location = 'Outdoor' and extract('hour' from time) = 12 and - extract('year' from time) = 2023 + extract('year' from time) = 2022 group by day order by day ) @@ -71,3 +71,16 @@ select extract('year' from time) = 2023 group by day order by day; + + +-- Tageswert +select + extract('day' from time)::varchar || '.' || extract('month' from time)::varchar || '.' || extract('year' from time)::varchar 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 + time::date = now()::date + group by day;