kept first updated record instead of last

This commit is contained in:
Joaquin Ossa 2024-09-13 17:14:34 +02:00
parent 32c8ffb655
commit d8501e2df7

View file

@ -10,7 +10,7 @@ with
select
v.*,
row_number() over (
partition by v.id_booking order by v.updated_at_utc desc
partition by v.id_booking order by v.updated_at_utc asc
) as rn
from int_edeposit__verifications v
where v.version = 'V1' and v.id_booking is not null