0-MID%Share Of WETH Inflow Volume By Swappers
    Updated 2023-06-02
    with task1 as (
    with act1 as (
    with tab1 as (
    select BLOCK_TIMESTAMP::date as date
    ,TX_HASH
    from arbitrum.core.fact_event_logs
    where ORIGIN_TO_ADDRESS='0xc873fecbd354f5a56e00e710b90ef4201db2448d' --Camelot Dex
    and TX_STATUS='SUCCESS'
    and EVENT_NAME='Swap'
    and date>='2023-01-01'),
    tab2 as (
    select BLOCK_TIMESTAMP::date as date
    ,TX_HASH
    ,ORIGIN_FROM_ADDRESS
    ,CONTRACT_ADDRESS
    ,RAW_AMOUNT
    from arbitrum.core.fact_token_transfers
    where date>='2023-01-01'
    and ORIGIN_FROM_ADDRESS=FROM_ADDRESS
    and CONTRACT_ADDRESS in ('0x82af49447d8a07e3bd95bd0d56f35241523fbab1'))
    select tab2.date
    ,tab2.TX_HASH
    ,ORIGIN_FROM_ADDRESS
    ,CONTRACT_ADDRESS
    ,RAW_AMOUNT
    from tab1
    left join tab2
    on tab1.TX_HASH=tab2.TX_HASH
    and tab1.date=tab2.date),
    act2 as (
    select ADDRESS
    ,DECIMALS
    ,SYMBOL
    from arbitrum.core.dim_contracts)
    select
    case
    Run a query to Download Data