diff --git a/queries/models/dashboard_bilhetagem_jae/view_passageiros_hora.sql b/queries/models/dashboard_bilhetagem_jae/view_passageiros_hora.sql index 2c276dcc..3aa99ab1 100644 --- a/queries/models/dashboard_bilhetagem_jae/view_passageiros_hora.sql +++ b/queries/models/dashboard_bilhetagem_jae/view_passageiros_hora.sql @@ -36,4 +36,3 @@ FROM LEFT JOIN servicos s USING(id_servico_jae) -WHERE tipo_transacao_smtr != "RioCard" \ No newline at end of file diff --git a/queries/models/dashboard_bilhetagem_jae/view_passageiros_hora_riocard.sql b/queries/models/dashboard_bilhetagem_jae/view_passageiros_hora_riocard.sql deleted file mode 100644 index 4653a502..00000000 --- a/queries/models/dashboard_bilhetagem_jae/view_passageiros_hora_riocard.sql +++ /dev/null @@ -1,36 +0,0 @@ --- depends_on: {{ ref('view_passageiros_hora') }} -WITH servicos AS ( - SELECT - * EXCEPT(rn) - FROM - ( - SELECT - *, - ROW_NUMBER() OVER (PARTITION BY id_servico_jae ORDER BY data_inicio_vigencia) AS rn - FROM - {{ ref("servicos") }} - ) - WHERE - rn = 1 -) -SELECT - p.data, - p.hora, - p.modo, - p.consorcio, - p.id_servico_jae, - s.servico, - s.descricao_servico, - CONCAT(s.servico, ' - ' ,s.descricao_servico) AS nome_completo_servico, - s.latitude AS latitude_servico, - s.longitude AS longitude_servico, - p.sentido, - p.quantidade_passageiros -FROM - {{ ref("passageiros_hora") }} p -LEFT JOIN - servicos s -USING(id_servico_jae) -WHERE - tipo_transacao_smtr = "RioCard" - AND modo IS NOT NULL \ No newline at end of file