mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 14:26:52 +00:00
Merge pull request #497 from FlipsideCrypto/quickfix-typo
quickfix/typo upd cte ref
This commit is contained in:
commit
97dfed3670
@ -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)
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user