added event_id to qualify(). I don't know if there can be one-to-many tx_ids / event_ids but it won't hurt

This commit is contained in:
Mike Stepanovic 2024-10-07 17:25:04 -06:00
parent 0ca7f48c1a
commit 4d99b5ff69
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ FROM
{{ ref('bronze__trade_account_deposit_events') }}
QUALIFY(
ROW_NUMBER() OVER (
PARTITION BY tx_id
PARTITION BY tx_id, event_id
ORDER BY __HEVO__LOADED_AT DESC
) = 1
)

View File

@ -19,7 +19,7 @@ FROM
{{ ref('bronze__trade_account_withdraw_events') }}
QUALIFY(
ROW_NUMBER() OVER (
PARTITION BY tx_id
PARTITION BY tx_id, event_id
ORDER BY __HEVO__LOADED_AT DESC
) = 1
)