PromotedPawnPolygon vs Ethereum Fees
    Updated 2022-07-06
    with eth as (
    select
    trunc(block_timestamp,'day') as days,
    sum(tx_fee) as eth_fees,
    avg(tx_fee) as eth_avg_fee,
    count(distinct tx_hash) as eth_nums_tx,
    sum(eth_value) as eth_tx_value,
    avg(gas_price) as eth_avg_gas

    from ethereum.core.fact_transactions

    where
    status = 'SUCCESS'
    and trunc(block_timestamp,'day') >= '2022-07-01'
    and trunc(block_timestamp,'day') < CURRENT_DATE

    group by 1
    order by 1
    ),

    pol as (
    select
    trunc(block_timestamp,'day') as days_pol,
    sum(tx_fee) as pol_fees,
    avg(tx_fee) as pol_avg_fee,
    count(distinct tx_hash) as pol_nums_tx,
    sum(matic_value) as pol_tx_value,
    avg(gas_price) as pol_avg_gas

    from polygon.core.fact_transactions

    where
    status = 'SUCCESS'
    and trunc(block_timestamp,'day') >= '2022-07-01'
    and trunc(block_timestamp,'day') < CURRENT_DATE

    Run a query to Download Data