Moesmg 1
    Updated 2022-10-02
    select *,
    amount_usd/users as usd_per_user
    from
    (with sushi_pools as
    (select
    POOL_ADDRESS
    from
    ethereum.core.dim_dex_liquidity_pools
    where PLATFORM ilike 'sushiswap')


    select
    case when block_timestamp >='2022-09-15' then 'Post Merge' else 'Pre Merge'end as date_type,
    'Deposit' as type,
    count(distinct tx_hash) as txs,
    count(distinct from_address) as users,
    sum(amount_usd) as amount_usd
    from
    ethereum.core.ez_token_transfers
    where block_timestamp::date between '2022-09-01' and '2022-09-29'
    and origin_function_signature in ('0xf305d719','0xe8e33700')
    and
    to_address in (SELECT * from sushi_pools)
    group by 1,2

    union all

    select
    case when block_timestamp >='2022-09-15' then 'Post Merge' else 'Pre Merge'end as date_type,
    'Withdraw' as type,
    count(distinct tx_hash) as txs,
    count(distinct to_address) as users,
    sum(amount_usd) as amount_usd
    Run a query to Download Data