Evaluating bids

Unir 3 queries em uma única query no Postgresql

Published on the June 02, 2021 in IT & Programming

About this project

Open

Eu tenho 3 queries prontas:

with tags as ( select name, description from tag where location = 6 and type = 'state_run')
select time, description, value
from event e
inner join tags t on t.name = e.tag
WHERE $__timefilter("time") and value=1
order by 1,2

with tags as ( select name, description from tag where location = 6 and type = 'state_motion')
select time, description, value
from event e
inner join tags t on t.name = e.tag
WHERE $__timefilter("time") and value=2
order by 1,2

with tags as ( select name, description from tag where location = 6 and type = 'state_mode')
select time, description, value
from event e
inner join tags t on t.name = e.tag
WHERE $__timefilter("time") and value=1
order by 1,2

eu preciso juntas estas 3 queries em uma única query pois para uma plotagem. 

Refere-se a dados coletados de uma maquina ao longo do tempo.  Me disseram para usar a função range para multiplicas as condições e gerar um valor para a plotgem, mas não consegui fazer funcionar.

Category IT & Programming
Subcategory Data Science
Project size Small
Is this a project or a position? Project
Required availability As needed

Delivery term: Not specified

Skills needed

Other projects posted by R. S.