Merge pull request #497 from FlipsideCrypto/quickfix-typo

quickfix/typo upd cte ref
This commit is contained in:
Jack Forgash 2025-08-11 14:21:35 -04:00 committed by GitHub
commit 97dfed3670
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,14 +53,13 @@ prices AS (
symbol,
price,
decimals,
is_native,
False AS is_native,
is_verified,
hour
FROM
{{ ref('silver__complete_token_prices') }}
WHERE
NOT is_native
AND is_verified
is_verified
QUALIFY(ROW_NUMBER() OVER (
PARTITION BY token_address, DATE_TRUNC('hour', hour)
ORDER BY hour DESC
@ -72,14 +71,12 @@ prices_native AS (
symbol,
price,
decimals,
is_native,
is_verified,
True AS is_native,
True AS is_verified,
hour
FROM
{{ ref('silver__complete_native_prices') }}
WHERE
is_native
AND is_verified
QUALIFY(ROW_NUMBER() OVER (
PARTITION BY name, DATE_TRUNC('hour', hour)
ORDER BY hour DESC
@ -118,7 +115,7 @@ FINAL AS (
LEFT JOIN labels l1 ON (
COALESCE(w.near_contract_address, b.token_address) = l1.contract_address
)
LEFT JOIN prices_crosschain p1 ON (
LEFT JOIN prices p1 ON (
COALESCE(l1.crosschain_token_contract, b.token_address) = p1.token_address
AND DATE_TRUNC('hour', b.block_timestamp) = DATE_TRUNC('hour', p1.hour)
)