SalehCelsius Swaps-Uniswap -top 10 wallets
    Updated 2022-06-19
    with univ2 as (
    select origin_from_address as wallet,
    count (distinct tx_hash) as TX_Count,
    sum (amount_in_usd) as USD_Volume
    from ethereum.core.ez_dex_swaps
    where origin_from_address in (select address from flipside_prod_db.crosschain.address_labels where project_name ='celsius network')
    and platform ilike '%uniswap%'
    group by 1
    order by 2 desc, 3 desc
    ),

    univ3 as (
    select RECIPIENT as wallet,
    count (distinct tx_id) as TX_Count,
    abs(sum (amount0_usd)) as USD_Volume
    from flipside_prod_db.uniswapv3.swaps
    where RECIPIENT in (select address from flipside_prod_db.crosschain.address_labels where project_name ='celsius network')
    group by 1
    order by 2 desc, 3 desc
    )

    select * from univ2 union all select * from univ3
    Run a query to Download Data