Afonso_Diaz2023-09-09 06:27 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'
    ),

    t2 as (
    select
    user,
    min(block_timestamp::date) as min_date,
    count(distinct tx_hash) as transactions,
    count(distinct block_timestamp::date) as active_days,
    min(block_timestamp)::date as created_at,
    datediff('day', min_date, current_date) as wallet_age
    from t
    Run a query to Download Data