Moepolygon gas0
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
›
⌄
with
p as (select hour::date as date,
avg (price) as price
from ethereum.core.fact_hourly_token_prices
where symbol = 'MATIC'
group by 1)
select
count(distinct tx_hash) as tx_count,
sum (tx_fee*price) as total_fee_usd,
total_fee_usd/tx_count as fee_per_tx,
total_fee_usd/30 as fee_per_day,
tx_count/30 as txn_per_day,
count(distinct BLOCK_NUMBER) as block_count,
total_fee_usd/block_count as fee_per_block
from polygon.core.fact_transactions join p on block_timestamp::Date = date
where block_timestamp >= CURRENT_DATE - 30
Run a query to Download Data