MLDZMNswaps and users
    Updated 2022-06-25
    with tb1 as (
    SELECT
    *
    FROM ethereum.core.fact_transactions
    WHERE to_address = lower('0x881D40237659C251811CEC9c364ef91dC08D300C')
    and STATUS='SUCCESS'
    ),

    tb2 as (select
    BLOCK_TIMESTAMP::date as day,
    count(distinct tx_hash) as swap_metamask,
    count(distinct FROM_ADDRESS) as users_metamask
    from tb1
    where BLOCK_TIMESTAMP>='2022-05-01'
    group by 1
    ),

    tb3 as (select
    BLOCK_TIMESTAMP::date as day,
    count(distinct tx_hash) as swap_uniswap,
    count(distinct SENDER) as users_uniswap
    from ethereum.core.ez_dex_swaps
    where PLATFORM='uniswap-v2'
    and BLOCK_TIMESTAMP>='2022-05-01'
    and tx_hash not in (select tx_hash from tb1)
    group by 1
    ),

    tb4 as (select
    BLOCK_TIMESTAMP::date as day,
    count(distinct tx_hash) as swap_sushiswap,
    count(distinct SENDER) as users_sushiswap
    from ethereum.core.ez_dex_swaps
    where PLATFORM='sushiswap'
    and BLOCK_TIMESTAMP>='2022-05-01'
    and tx_hash not in (select tx_hash from tb1)
    Run a query to Download Data