RayyykL2StateOfMind 3
    Updated 2022-09-02
    with table_1 as (select origin_from_address as wallets
    from optimism.core.fact_event_logs
    where contract_address ilike '0x66Deb6cC4d65dc9CB02875DC5E8751d71Fa5D50E'
    and tx_status = 'SUCCESS'
    and event_name = 'Transfer'),

    table_2 as (select count(distinct(buyer_address)) as buyers_count
    from optimism.core.ez_nft_sales a
    join table_1 b on a.buyer_address = b.wallets
    where block_timestamp >= current_date - 90),

    table_3 as (select count(distinct(wallets)) as wallet_count
    from table_1)

    select buyers_count, 'Wallets that have bought an NFT'
    from table_2
    union
    select wallet_count - buyers_count, 'Wallets that have not bought an NFT'
    from table_2,table_3
    Run a query to Download Data