h4wkholders over time
    Updated 2024-12-22
    -- forked from holders @ https://flipsidecrypto.xyz/edit/queries/69206f2e-7fc6-4aca-83ab-c5f94d8ecb3e

    with base as (
    select block_timestamp,
    'Inflow' as type,
    amount,
    tx_to as wallet
    from solana.core.fact_transfers
    where mint = 'SHDWyBxihqiCj6YekG2GUr7wqKLeLAMK1gHZck9pL6y'
    and block_timestamp::date >= '2021-12-10'

    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'
    and block_timestamp::date >= '2021-12-10'

    UNION ALL

    select block_timestamp,
    'Outflow' as type,
    amount,
    tx_from as wallet
    from solana.core.fact_transfers
    where mint = 'SHDWyBxihqiCj6YekG2GUr7wqKLeLAMK1gHZck9pL6y'
    and block_timestamp::date >= '2021-12-10'

    UNION ALL

    select a.block_timestamp,
    'Outflow' as type,
    Last run: about 1 month ago
    DATE
    IN_HOLDERS
    OUT_HOLDERS
    HOLDERS
    1
    2024-12-22 00:00:00.00023446817245262016
    2
    2024-12-21 00:00:00.00023437117215062221
    3
    2024-12-20 00:00:00.00023377717109562682
    4
    2024-12-19 00:00:00.00023346917062262847
    5
    2024-12-18 00:00:00.00023303817009762941
    6
    2024-12-17 00:00:00.00023262016956163059
    7
    2024-12-16 00:00:00.00023217016904063130
    8
    2024-12-15 00:00:00.00023159016837163219
    9
    2024-12-14 00:00:00.00023127116804263229
    10
    2024-12-13 00:00:00.00023110616779063316
    11
    2024-12-12 00:00:00.00023067216726863404
    12
    2024-12-11 00:00:00.00023042016699563425
    13
    2024-12-10 00:00:00.00023003616661663420
    14
    2024-12-09 00:00:00.00022972116630463417
    15
    2024-12-08 00:00:00.00022922016589763323
    16
    2024-12-07 00:00:00.00022875416559563159
    17
    2024-12-06 00:00:00.00022852916530863221
    18
    2024-12-05 00:00:00.00022804616479363253
    19
    2024-12-04 00:00:00.00022734716407463273
    20
    2024-12-03 00:00:00.00022718216385263330
    ...
    1086
    50KB
    1172s