alitaslimiArbitrum Swap Transactions
    Updated 2023-08-16
    with
    swaps as (
    select
    block_number,
    block_timestamp,
    tx_hash,
    origin_from_address as swapper,
    platform,
    contract_address,
    pool_name,
    token_in,
    token_out,
    symbol_in,
    symbol_out,
    amount_in,
    amount_out,
    amount_in_usd,
    amount_out_usd
    from
    arbitrum.core.ez_dex_swaps
    )
    select
    *
    -- block_timestamp::date as "Date",
    -- platform as "DEX",
    -- count(distinct tx_hash) as "Swaps",
    -- count(distinct origin_from_address) as "Swappers",
    -- sum(amount_out_usd) as "Volume"
    from
    swaps
    where
    block_timestamp::date between '2023-07-01' and (current_date - 2)
    and amount_out_usd is null
    -- group by
    -- "Date",
    -- "DEX"