potmoMatic Fees USD
Updated 2022-07-09Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
›
⌄
with matic_fee as (
select date_trunc('hour', block_timestamp) as date_time,
avg(tx_fee) as fee
from polygon.core.fact_transactions
where block_timestamp::date >= '2022-07-01'
group by 1
order by 1
),
matic_usd as (
select hour, price
from ethereum.core.fact_hourly_token_prices
where hour::date >= '2022-07-01'
and symbol ilike 'matic'
)
select f.date_time,
f.fee ,
u.price as price_usd,
fee * price_usd as fee_usd
from
matic_fee f
left join
matic_usd u
on f.date_time = u.hour
order by 1
Run a query to Download Data