Skip to content

Commit

Permalink
adiciona filtro feed_version e tipo_os na CTE dia_anterior
Browse files Browse the repository at this point in the history
  • Loading branch information
akaBotelho committed Aug 23, 2024
1 parent f337ebc commit 8038280
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions queries/models/projeto_subsidio_sppo/viagem_planejada.sql
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ WITH
USING (feed_start_date, feed_version, tipo_dia, tipo_os)
WHERE
faixa_horaria_inicio = "24:00:00"
AND tipo_os = (SELECT tipo_os FROM data_versao_efetiva WHERE data = DATE_SUB("{{ var('run_date') }}", INTERVAL 2 DAY))
AND feed_version = (SELECT feed_version FROM data_versao_efetiva WHERE data = DATE_SUB("{{ var('run_date') }}", INTERVAL 2 DAY))
AND tipo_dia = (SELECT tipo_dia FROM data_versao_efetiva WHERE data = DATE_SUB("{{ var('run_date') }}", INTERVAL 2 DAY))
),
combina_trips_shapes AS (
Expand Down

0 comments on commit 8038280

Please sign in to comment.