Afonso_Diaztotal
Updated 2024-10-10
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with
new_contracts as (
select
contract_address,
min(block_timestamp) as created_at
from avalanche.core.ez_decoded_event_logs
group by 1
)
select
count(distinct contract_address) as total_contracts,
count(distinct tx_hash) as transactions,
count(distinct origin_from_address) as users,
sum(tx_fee) / total_contracts as average_fee_volume_per_contract,
transactions / total_contracts as average_transactions_per_contract,
total_contracts / users as total_contracts_per_user,
(select count(distinct contract_address) from new_contracts where created_at >= current_date - 30) as new_contracts_produced_last_30_days
from avalanche.core.fact_transactions
join avalanche.core.fact_event_logs
using(tx_hash, block_timestamp)
where block_timestamp::date between '{{ start_date }}' and '{{ end_date }}'
QueryRunArchived: QueryRun has been archived