primo_dataocean_current_holders
    Updated 2023-03-22
    -- Request: wallet address, number of ocean tokens in wallet, data of first ocean purchase, total wallet balance)
    -- Fact Check: https://etherscan.io/token/0x967da4048cd07ab37855c090aaf366e4ce1b9f48#balances
    with first_token as (
    select to_address user_address, min(block_timestamp) first_token_dttm
    from ethereum.core.ez_token_transfers
    where contract_address in ('0x7afebbb46fdb47ed17b22ed075cde2447694fb9e','0x967da4048cd07ab37855c090aaf366e4ce1b9f48') -- old, current OCEAN contracts
    and raw_amount > 0
    group by 1
    )
    select
    b.user_address
    , l.address_name
    , b.current_bal
    , b.usd_value_now
    , ft.first_token_dttm
    from ethereum.core.ez_current_balances b
    left join first_token ft
    on b.user_address = ft.user_address
    left join ethereum.core.dim_labels l
    on lower(b.user_address) = lower(l.address)
    where lower(contract_address) = lower('0x967da4048cd07ab37855c090aaf366e4ce1b9f48') -- current OCEAN contract

    Run a query to Download Data