mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 09:41:44 +00:00
18 lines
476 B
SQL
18 lines
476 B
SQL
{% macro deduped_blocks(table_name) -%}
|
|
(
|
|
select
|
|
*
|
|
from {{ source("chainwalkers", table_name) }}
|
|
qualify row_number() over (partition by block_id order by ingested_at desc) = 1
|
|
)
|
|
{%- endmacro %}
|
|
|
|
{% macro deduped_txs(table_name ) -%}
|
|
(
|
|
select
|
|
*
|
|
from {{ source("chainwalkers", table_name) }}
|
|
qualify row_number() over (partition by tx_id order by ingested_at desc) = 1
|
|
)
|
|
{%- endmacro %}
|