additional queries
This commit is contained in:
@ -23,3 +23,17 @@ create or replace view power_v as
|
|||||||
where application = 'Power' and
|
where application = 'Power' and
|
||||||
attributes->>'Status' = 'Ok';
|
attributes->>'Status' = 'Ok';
|
||||||
|
|
||||||
|
create or replace view temperature_heating_v as
|
||||||
|
select time,
|
||||||
|
cast(values->'Value'->>'value' as float) as temperature,
|
||||||
|
device
|
||||||
|
from measurements
|
||||||
|
where application = 'Temperature Heating';
|
||||||
|
|
||||||
|
create or replace view gas_v as
|
||||||
|
select time,
|
||||||
|
cast(values->'Volume'->>'value' as float) as volume,
|
||||||
|
device
|
||||||
|
from measurements
|
||||||
|
where application = 'Gas' and
|
||||||
|
attributes->>'Status' = 'Ok';
|
||||||
|
Reference in New Issue
Block a user