0-MIDTotal Tx Status stats
    Updated 2023-04-13
    select 'ARBITRUM'as chain
    ,case
    when STATUS='SUCCESS' then 'TRUE' else 'FALSE' end as tx_type
    ,count(distinct FROM_ADDRESS) as "ACTIVE USERS"
    ,sum(TX_FEE) as "TX FEE(ETH)"
    ,count(distinct TX_HASH) as "TX COUNT"
    ,"TX COUNT"/"ACTIVE USERS" as "PER USER TX COUNT"
    from arbitrum.core.fact_transactions
    where BLOCK_TIMESTAMP>='{{Start_Date}}' and BLOCK_TIMESTAMP<='{{End_Date}}'
    group by 1,2
    union all
    select 'OPTIMISM'as chain
    ,case
    when STATUS='SUCCESS' then 'TRUE' else 'FALSE' end as tx_type
    ,count(distinct FROM_ADDRESS) as "ACTIVE USERS"
    ,sum(TX_FEE) as "TX FEE(ETH)"
    ,count(distinct TX_HASH) as "TX COUNT"
    ,"TX COUNT"/"ACTIVE USERS" as "PER USER TX COUNT"
    from optimism.core.fact_transactions
    where BLOCK_TIMESTAMP>='{{Start_Date}}' and BLOCK_TIMESTAMP<='{{End_Date}}'
    group by 1,2
    Run a query to Download Data