superflySwap volume by DEX
    Updated 2023-01-13
    with uniswap as (
    select block_timestamp::date as date, count(1) as tx_count
    from arbitrum.core.fact_token_transfers a
    left join arbitrum.core.dim_labels b on a.to_address = b.address
    where b.label_subtype = 'swap_contract'
    and b.project_name = 'uniswap'
    and block_timestamp::date < CURRENT_DATE
    group by 1
    ), sushiswap as (
    select block_timestamp::date as date, count(1) as tx_count
    from arbitrum.core.fact_token_transfers a
    left join arbitrum.core.dim_labels b on a.to_address = b.address
    where b.label_subtype = 'swap_contract'
    and b.project_name = 'sushiswap'
    and block_timestamp::date < CURRENT_DATE
    group by 1
    )
    select a.date, a.tx_count as uniswap_swaps, b.tx_count as sushiswap_swaps,
    a.tx_count + b.tx_count as total_swaps,
    (a.tx_count - b.tx_count) / a.tx_count * 100 as pct_diff
    from uniswap a left join sushiswap b on a.date = b.date
    Run a query to Download Data