Skip to content

Commit

Permalink
metrics: Tron transactions (duneanalytics#7068)
Browse files Browse the repository at this point in the history
* add tron to transactions

* fast CI

* remove from evm.trans

* remove short CI
  • Loading branch information
0xRobin authored Oct 31, 2024
1 parent 8576a31 commit 53bd40b
Showing 1 changed file with 34 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,41 @@
)
}}



with raw_tx as (
select
blockchain
, cast(date_trunc('day', block_time) as date) as block_date
, hash as tx_hash
from
{{ source('evms', 'transactions') }}
where
1 = 1
{% if is_incremental() %}
and {{ incremental_predicate('block_time') }}
{% endif %}
group by
blockchain
, cast(date_trunc('day', block_time) as date)
, hash
select * from (
select
blockchain
, cast(date_trunc('day', block_time) as date) as block_date
, hash as tx_hash
from
{{ source('evms', 'transactions') }}
where
1 = 1
{% if is_incremental() %}
and {{ incremental_predicate('block_time') }}
{% endif %}
group by
blockchain
, cast(date_trunc('day', block_time) as date)
, hash
) union all
select * from (
select
'tron' as blockchain
, cast(date_trunc('day', block_time) as date) as block_date
, hash as tx_hash
from
{{ source('tron', 'transactions') }}
where
1 = 1
{% if is_incremental() %}
and {{ incremental_predicate('block_time') }}
{% endif %}
)
), net_transfers_filter as (
select
select
blockchain
, block_date
, tx_hash
Expand Down Expand Up @@ -59,4 +76,4 @@ from
filtered_tx
group by
blockchain
, block_date
, block_date

0 comments on commit 53bd40b

Please sign in to comment.