hessTotal Swap
    Updated 2025-02-21
    with base as ( select block_timestamp,
    tx_hash,
    origin_from_address::string as swapper,
    contract_address,
    symbol,
    amount,
    to_address,
    event_index,
    from_address
    from sei.core_evm.ez_token_transfers
    where tx_hash in (select tx_hash
    from sei.core_evm.fact_event_logs
    where topics[0]::string = '0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822'
    )
    and block_timestamp::date >= '2024-05-27')
    ,
    index as ( select tx_hash,
    event_index as max,
    rank() over (partition by tx_hash order by event_index desc) as rank
    from sei.core_evm.ez_token_transfers
    where tx_hash in (select tx_hash from base)
    qualify rank <= 2
    )
    ,
    min_index as ( select tx_hash,
    min(event_index) as min
    from sei.core_evm.ez_token_transfers
    where tx_hash in (select tx_hash from base)
    group by 1
    )
    ,
    token_in as ( select block_timestamp,
    a.tx_hash,
    swapper,
    contract_address as token_in_address,
    symbol as symbol_in,
    Last run: 2 months ago
    VOLUME_USD
    SWAPS
    SWAPPERS
    Average Volume Per User
    Avg Trade Volume
    Median Trade Volume
    Max Trade Volume
    FROM_TOKENS
    TO_TOKENS
    1
    254726063.09996316050221472481729.91187045160.08063109422.9790945873900244262
    1
    89B
    68s