Eman-Raz2024-05-25 01:07 PM
    Updated 2024-10-12
    with Axelar as (with tab1 as (select block_timestamp::date as "Date", avg(fee)/pow(10,6) as "Average Fee per TX", count(distinct tx_id) as "TXs Count"
    from axelar.core.fact_transactions
    where block_timestamp::date>='{{Start_Date}}' and block_timestamp::date<='{{End_Date}}'
    and fee_denom='uaxl' and tx_succeeded='true'
    group by 1
    order by 1)
    select corr("TXs Count","Average Fee per TX") as cc, 'Axelar' as "Chain"
    from tab1),


    arbitrum as (with tab1 as (select block_timestamp::date as "Date", avg(tx_fee) as "Average Fee per TX", count(distinct tx_hash) as "TXs Count"
    from arbitrum.core.fact_transactions
    where block_timestamp::date>='{{Start_Date}}' and block_timestamp::date<='{{End_Date}}'
    and Status='SUCCESS'
    group by 1
    order by 1)
    select corr("TXs Count","Average Fee per TX") as cc, 'Arbitrum' as "Chain"
    from tab1),



    avalanche as (with tab1 as (select block_timestamp::date as "Date", avg(tx_fee) as "Average Fee per TX", count(distinct tx_hash) as "TXs Count"
    from avalanche.core.fact_transactions
    where block_timestamp::date>='{{Start_Date}}' and block_timestamp::date<='{{End_Date}}'
    and Status='SUCCESS'
    group by 1
    order by 1)
    select corr("TXs Count","Average Fee per TX") as cc, 'Avalanche' as "Chain"
    from tab1),

    base as (with tab1 as (select block_timestamp::date as "Date", avg(tx_fee) as "Average Fee per TX", count(distinct tx_hash) as "TXs Count"
    from base.core.fact_transactions
    where block_timestamp::date>='{{Start_Date}}' and block_timestamp::date<='{{End_Date}}'
    and Status='SUCCESS'
    group by 1
    order by 1)
    QueryRunArchived: QueryRun has been archived