0-MIDtop 10 fee compare
    Updated 2023-01-12
    with tab1 as (
    select TX_SENDER
    ,count(distinct TX_ID) as tx_cont
    ,sum(FEE) as fee_amount
    from terra.core.fact_transactions
    where BLOCK_TIMESTAMP>='2022-12-11' and BLOCK_TIMESTAMP<'2022-12-25'
    and TX_SUCCEEDED='TRUE'
    group by 1
    order by 3 desc
    limit 10),
    tab2 as (
    select TX_SENDER
    ,count(distinct TX_ID) as tx_cont
    ,sum(FEE) as fee_amount
    from terra.core.fact_transactions
    where BLOCK_TIMESTAMP>='2022-12-25' and BLOCK_TIMESTAMP<='2023-01-07'
    and TX_SUCCEEDED='TRUE'
    group by 1
    order by 3 desc
    limit 10)
    select
    'TWO WEEKS BEFORE HOLIDAYS'as t_type
    ,sum(fee_amount) as top_10_fee
    from tab1
    group by 1
    union all
    select
    'DURING THE HOLIDAYS'as t_type
    ,sum(fee_amount) as top_10_fee
    from tab2
    group by 1


    Run a query to Download Data