MilesFinchUntitled Query
    Updated 2022-07-08
    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