Skip to content

Commit

Permalink
Adiciona subsidio_km_teto na viagens_remuneradas
Browse files Browse the repository at this point in the history
  • Loading branch information
akaBotelho committed Jul 18, 2024
1 parent 99fed7f commit 4699fcc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ WITH
DISTINCT data_inicio,
data_fim,
status,
subsidio_km
subsidio_km,
MAX(subsidio_km) OVER (PARTITION BY data_inicio, data_fim) AS subsidio_km_teto
FROM
{{ ref("subsidio_valor_km_tipo_viagem") }} ),
-- 5. Viagens com tipo e valor de subsídio por km
Expand All @@ -125,7 +126,8 @@ WITH
ve.status AS tipo_viagem,
id_viagem,
distancia_planejada,
t.subsidio_km
t.subsidio_km,
t.subsidio_km_teto
FROM
viagem AS v
LEFT JOIN
Expand Down

0 comments on commit 4699fcc

Please sign in to comment.