Afonso_Diaz2023-09-08 05:26 PM
    Updated 2023-09-27
    with t as (
    select
    tx_hash,
    block_timestamp,
    origin_from_address as user
    from ethereum.defi.ez_dex_swaps
    where platform = 'uniswap-v3'

    union all

    select
    tx_hash,
    block_timestamp,
    liquidity_provider as user
    from ethereum.uniswapv3.ez_lp_actions

    union all

    select
    tx_hash,
    block_timestamp,
    seller_address as user
    from ethereum.nft.ez_nft_sales
    where origin_to_address = lower('0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b')
    and event_type = 'sale'
    )

    select
    'Active Users' as type,
    count(distinct user) as users
    from t
    where user in (select distinct user from t
    where block_timestamp::date >= '2023-04-11')

    union all

    Run a query to Download Data