h4wkbase top holders
    Updated 2024-08-08
    with base as (
    select block_timestamp,
    'Inflow' as type,
    amount,
    tx_to as wallet
    from solana.core.fact_transfers
    where mint = 'SHDWyBxihqiCj6YekG2GUr7wqKLeLAMK1gHZck9pL6y'

    UNION ALL

    select a.block_timestamp,
    'Inflow' 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 = 'SHDWyBxihqiCj6YekG2GUr7wqKLeLAMK1gHZck9pL6y'

    UNION ALL

    select block_timestamp,
    'Outflow' as type,
    amount,
    tx_from as wallet
    from solana.core.fact_transfers
    where mint = 'SHDWyBxihqiCj6YekG2GUr7wqKLeLAMK1gHZck9pL6y'

    UNION ALL

    select a.block_timestamp,
    'Outflow' as type,
    burn_amount/pow(10, decimal) as amount,
    owner as wallet
    from solana.defi.fact_token_burn_actions a
    join solana.core.fact_token_account_owners b on (token_account = account_address)
    where mint = 'SHDWyBxihqiCj6YekG2GUr7wqKLeLAMK1gHZck9pL6y'
    QueryRunArchived: QueryRun has been archived