Elprognerd2 daily
Updated 2023-03-27Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
select
date_trunc('{{Time_Unit}}',x.block_timestamp) as date,
count(Distinct contract_address) as "Number of contracts",
count (distinct from_address) as "Active users",
count (distinct x.tx_hash) as "Number of txns",
sum("Number of txns") over (order by date) as "Cumulative number of txns",
sum(tx_fee) as "Total fees",
sum("Total fees") over (order by date) as "Cumulative Total fees",
avg(tx_fee) as "Average fee per txn",
median(tx_fee) as "Median of fees",
min(tx_fee) as "Min of fee",
max(tx_fee) as "Max of fee"
from avalanche.core.fact_transactions x join avalanche.core.fact_event_logs y on x.tx_hash = y.tx_hash
join avalanche.core.dim_contracts z on y.contract_address = z.address
where x.block_timestamp >= '{{From_Date}}'
and x.block_timestamp <= '{{To_Date}}'
GROUP by 1
ORDER by 1
Run a query to Download Data