Skip to content

Commit

Permalink
Hotfix sumario_servico_dia (#197)
Browse files Browse the repository at this point in the history
commit inicial
  • Loading branch information
eng-rodrigocunha authored Jan 25, 2024
1 parent 50736ca commit 7cfaade
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions models/dashboard_subsidio_sppo/sumario_servico_dia_tipo.sql
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ WITH
indicador_autuacao_limpeza,
indicador_autuacao_equipamento,
indicador_sensor_temperatura,
indicador_validador_sbd )) AS indicadores,
indicador_validador_sbd,
indicador_registro_agente_verao_ar_condicionado )) AS indicadores,
ARRAY_AGG(status) AS status_array
FROM
subsidio_parametros
Expand Down Expand Up @@ -189,7 +190,7 @@ WITH
km_apurada,
FROM
servico_km ) PIVOT(SUM(viagens) AS viagens,
SUM(km_apurada) AS km_apurada FOR tipo_viagem IN (
COALESCE(SUM(km_apurada),0) AS km_apurada FOR tipo_viagem IN (
{% if execute %}
{% set status_q = run_query(status_list_query) %}
{% set status_list = status_q.columns[0].values() %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parametros AS (
{{ ref("subsidio_parametros") }}
WHERE
data_inicio >= '2023-07-04'
AND data_fim <= '2023-12-31'
)
SELECT
consorcio,
Expand Down

0 comments on commit 7cfaade

Please sign in to comment.