bergDaily Ethereum Transactions Number in last month
Updated 2022-11-16Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
select
date_trunc('day', block_timestamp)::date as day,
count(distinct(tx_hash)) as tx_num,
avg(price) as avg_price,
avg_price * sum(gas_used/ pow (10, 9)) as total_amount,
(total_amount / (avg_price * sum(eth_value) / pow(10, 6))) as average_cost,
(total_amount / count(distinct(block_number))) as avg_amount_per_block,
(total_amount / tx_num) as avg_amount_per_txn,
sum(total_amount) over (order by day asc) as comulative_total_amount,
sum(tx_num) over (order by day asc) as comulative_tx_num,
avg (avg_price) over (order by day rows between 6 preceding and current row) as moving_avg_7_days,
avg (avg_price) over (order by day rows between 29 preceding and current row) as moving_avg_30_days
from ethereum.core.fact_hourly_token_prices a
join ethereum.core.fact_transactions b
on block_timestamp::date = hour::date
where 1 = 1
and token_address is null
and day >= '2022-10-01'
group by day
order by day asc
Run a query to Download Data