0-MIDtotal count per swappers opti
    Updated 2023-04-13
    select count(distinct ORIGIN_FROM_ADDRESS)as unique_swappers
    ,count(distinct TX_HASH)as swap_count,swap_count/unique_swappers as total_swap_count_per_swapper
    , case
    when (ORIGIN_TO_ADDRESS ='0xbe811a0d44e2553d25d11cb8dc0d3f0d0e6430e6'
    or ORIGIN_TO_ADDRESS='0x40e223295f6f216feede416d6b9e198368ed663a'
    or ORIGIN_TO_ADDRESS='0x35f048853b59400fbec80748592904f66374cfc0'
    or ORIGIN_TO_ADDRESS='0xe52180815c81d7711b83412e53259bed6a3ab70a') then 'Sushiswap'
    when ORIGIN_TO_ADDRESS='0xe592427a0aece92de3edee1f18e0157c05861564'
    or ORIGIN_TO_ADDRESS='0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45' then 'Uniswap' end as rutrs
    from optimism.core.fact_event_logs
    where (ORIGIN_TO_ADDRESS='0xbe811a0d44e2553d25d11cb8dc0d3f0d0e6430e6'or
    ORIGIN_TO_ADDRESS='0x40e223295f6f216feede416d6b9e198368ed663a'or
    ORIGIN_TO_ADDRESS='0x35f048853b59400fbec80748592904f66374cfc0' or
    ORIGIN_TO_ADDRESS='0xe52180815c81d7711b83412e53259bed6a3ab70a'or
    ORIGIN_TO_ADDRESS='0xe592427a0aece92de3edee1f18e0157c05861564'or
    ORIGIN_TO_ADDRESS='0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45')
    and TX_STATUS='SUCCESS'
    group by 4
    Run a query to Download Data