bachicelsius query
    Updated 2022-06-21
    with
    celsius_addresses as (
    select * from crosschain.address_labels
    where address_name = 'celsius wallet' and
    project_name = 'celsius network'
    )

    /*
    select round(sum(amount_in),2) as tokens, symbol_in,
    case when platform like '%uniswap%' then 'Uniswap'
    when platform = 'sushiswap' then 'Sushiswap'
    end as platfrm
    from ethereum.core.ez_dex_swaps where (platform = 'sushiswap' or platform like 'uniswap%')
    and origin_from_address in (
    select address from celsius_addresses
    ) and symbol_in is not null
    group by symbol_in, platfrm
    */

    select origin_from_address as wallet, round(sum(amount_in),2) as tokens, symbol_in,
    case when platform like '%uniswap%' then 'Uniswap'
    when platform = 'sushiswap' then 'Sushiswap'
    end as platfrm
    from ethereum.core.ez_dex_swaps where (platform = 'sushiswap' or platform like 'uniswap%')
    and origin_from_address in (
    select address from celsius_addresses
    ) and symbol_in is not null
    group by wallet, symbol_in, platfrm

    /*select round(sum(amount_out),2) as tokens, symbol_out,
    case when platform like '%uniswap%' then 'Uniswap'
    when platform = 'sushiswap' then 'Sushiswap'
    end as platfrm
    from ethereum.core.ez_dex_swaps where (platform = 'sushiswap' or platform like 'uniswap%')
    and origin_from_address in (
    select address from addresses
    Run a query to Download Data