MLDZMNsushi4
    Updated 2022-10-03
    with tb1 as (SELECT *
    from ethereum.core.dim_dex_liquidity_pools
    where PLATFORM='sushiswap')
    SELECT
    POOL_NAME,
    CASE
    when BLOCK_TIMESTAMP<'2022-09-15' and BLOCK_TIMESTAMP>='2022-09-01' then 'Two weeks before merge'
    when BLOCK_TIMESTAMP>='2022-09-15'and BLOCK_TIMESTAMP<='2022-09-29' then 'Two weeks after merge'
    else null end as time_frame,
    count(distinct ORIGIN_FROM_ADDRESS) as total_LP_providers,
    count(tx_hash) as no_txn,
    sum(amount_usd) as volume
    from ethereum.core.ez_token_transfers s left join ethereum.core.dim_dex_liquidity_pools b on s.TO_ADDRESS=b.POOL_ADDRESS
    where TO_ADDRESS in (select POOL_ADDRESS from tb1)
    and ORIGIN_TO_ADDRESS='0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
    and origin_function_signature in ('0xe8e33700', '0xded9382a', '0xf305d719')
    and time_frame is not null
    group by 1,2 having volume is not null
    order by 5 desc limit 10
    Run a query to Download Data