MilesFinchUntitled Query
Updated 2022-07-08
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with
polygon_cte as (
select trunc(block_timestamp,'hour') hour, avg(tx_fee) tx_fee
from polygon.core.fact_transactions
where status = 'SUCCESS'
and date(block_timestamp) >= '2022-07-01'
group by 1
)
,eth_cte as (
select trunc(block_timestamp,'hour') hour, avg(tx_fee) tx_fee
from ethereum.core.fact_transactions
where status = 'SUCCESS'
and date(block_timestamp) >= '2022-07-01'
group by 1
)
,join_cte as (
select a.hour, a.tx_fee tx_fee_matic, b.tx_fee tx_fee_eth
from polygon_cte a
left join eth_cte b using(hour)
)
select hour, tx_fee_matic, tx_fee_eth from join_cte
Run a query to Download Data