From 8cfc92c22634818c5722f94e2b82ac70a5ae5e71 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 15 Jan 2024 11:12:23 +0100 Subject: [PATCH] some more views --- queries/hottis.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/queries/hottis.sql b/queries/hottis.sql index c627ac5..a1dc7e0 100644 --- a/queries/hottis.sql +++ b/queries/hottis.sql @@ -76,3 +76,11 @@ create or replace view co2_v as device from measurements where application = 'de-hottis-app01' and attributes->>'DeviceType' = 'hottis-scd30'; + +create or replace view locative_v as + select time, + device as person, + values->'Location'->>'value' as location, + values->'Trigger'->>'value' as direction + from measurements + where application = 'Locative';