SalehUntitled Query
    Updated 2022-07-13
    with uniswap2 as (
    select
    date_trunc(week, block_timestamp)::date as date
    ,pool_name
    ,count (distinct tx_hash) as tx_count
    ,sum(amount_in_usd) as sum_usd
    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'
    group by address
    )
    -------------------------------------------------------------------------------
    group by date ,pool_name
    order by date
    )
    , uniswap3 as (
    select
    date_trunc(week, block_timestamp)::date as date
    ,pool_name
    ,count (distinct TX_ID) as tx_count
    ,abs(sum(AMOUNT1_USD))as sum_usd
    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 address
    )
    -------------------------------------------------------------------------------
    group by date ,pool_name
    order by date
    )
    Run a query to Download Data