MLDZMNOC16
    Updated 2022-10-08
    with
    ft_activity as (
    select

    BUYER_ADDRESS as user_address,
    block_timestamp
    from ethereum.core.ez_nft_sales t1
    where PLATFORM_NAME='rarible'
    and block_timestamp > current_date() - interval '10 month'
    and not exists (
    select 1
    from ethereum.core.ez_nft_sales t2
    where PLATFORM_NAME='rarible'
    and block_timestamp
    between current_date() - interval '10 month' - interval '2 months'
    and current_date() - interval '10 month'
    and t1.BUYER_ADDRESS = t2.BUYER_ADDRESS
    )
    ),

    ft_users as (

    select

    user_address,
    date_trunc('month',min(block_timestamp)) as first_month

    from ft_activity
    group by 1
    ),

    activity as (

    Run a query to Download Data