Flipside Teamholder types
    Updated 2025-02-24
    with reward as (

    select a.block_timestamp,
    'Contributor' as type,
    mint_amount/pow(10, decimal) as amount,
    owner as wallet
    from solana.defi.fact_token_mint_actions a
    join solana.core.fact_token_account_owners b on (token_account = account_address)
    where mint = '4vMsoUT2BWatFweudnQM1xedRLfJgJ7hswhcpz4xgBTy'
    and block_timestamp::date >= '2022-11-02'
    )
    , purchase as (

    select block_timestamp,
    'Purchaser' as type,
    swap_to_amount as amount,
    swapper as wallet
    from solana.defi.fact_swaps
    where swap_to_mint = '4vMsoUT2BWatFweudnQM1xedRLfJgJ7hswhcpz4xgBTy'
    and block_timestamp::date >= '2022-11-02'

    )
    , agg as (
    select
    -- block_timestamp::date as date,
    case when a.amount is not null and b.amount is not null then 'Both Types'
    when a.amount is not null then a.type
    else b.type end as type_,
    count(distinct case when type_ = 'Both Types' then a.wallet
    when type_ = 'Contributor' then a.wallet
    else b.wallet end) as wallets,
    sum(case when type_ = 'Both Types' then a.amount + b.amount
    when type_ = 'Contributor' then a.amount
    else b.amount end) as "HONEY Amount",
    from reward a
    Last run: about 2 months ago
    TYPE_
    WALLETS
    HONEY Amount
    1
    Contributor72737295517148.699648
    2
    Both Types429451726327550.0176
    3
    Purchaser50321288794305.336788
    3
    114B
    184s