MoDeFiGPC - tokens holders and supply week 3
    Updated 2025-03-18
    with tokens_data as (
    select *
    from $query('75f58bb3-b2cd-4208-85e9-e3d75d901a1c')),

    holders as (
    select * from
    (select user, contract, sum(amount) as balance
    from
    (
    select from_address as user, -RAW_AMOUNT_PRECISE as amount, tx_hash, contract
    from polygon.core.fact_token_transfers
    join tokens_data b
    on contract=CONTRACT_ADDRESS
    where BLOCK_TIMESTAMP::date>=start_date
    and BLOCK_TIMESTAMP<date_trunc(hour, '2025-03-17 18:00:00.000'::timestamp)
    union all
    select to_address, RAW_AMOUNT_PRECISE, tx_hash, contract
    from polygon.core.fact_token_transfers
    join tokens_data
    on contract=CONTRACT_ADDRESS
    where BLOCK_TIMESTAMP::date>=start_date
    and BLOCK_TIMESTAMP<date_trunc(hour, '2025-03-17 18:00:00.000'::timestamp))
    group by 1,2)
    where balance>0
    )


    select b.symbol, a.contract, count(*) as users, sum(balance/pow(10, decimal)) as supply, round
    from holders a
    join tokens_data b
    on a.contract=b.contract
    where balance/pow(10, decimal)>=0.00000001
    and user!='0x000000000000000000000000000000000000dead'
    group by 1,2, round
    Last run: 25 days ago
    SYMBOL
    CONTRACT
    USERS
    SUPPLY
    ROUND
    1
    STONEY0x1917f5c4d5ed06383b43e47f1e59ed1f3cb5707420310000000001
    2
    GONE0x162539172b53e9a93b7d98fb6c41682de558a3202289768570425447.49651
    3
    SPK0x313ef6965f7a94d8e13602a52734833b0d566f855531000000002
    4
    BORGER0x90880ee788963585525241bac32e7c99c3d0630f1684069926233991
    5
    COS0xf775c8accf969e1d3277afa96f1f106960f1c9867481000000002
    6
    DHG0x75c0a194cd8b4f01d5ed58be5b7c5b61a9c69d0a1431000000001
    7
    PEAR0xc760a77356563560260c9e571af6dbbab396be38629999331437.2703381
    8
    CHMP0x2213dde228f71f9d4fc7ac78bd0fa1aed6ff1f942100100003
    9
    IGS0xe302672798d12e7f68c783db2c2d5e6b48ccf3ce2071000000001
    10
    JOBS0xd376cfc6baba795f8ce6e18b623ca0b6a227329d6310000000001
    11
    CHAI0x6f75b5b0d58b36e1c71e6132e2896414b2007b04135007519401
    12
    DOOMGPT0xec1c7615c781e5e1d4a69c79454e50ac34e7ad8927410000000001
    13
    PILOT0x222c6b7abb32e7ef25baf599fb139001dd5848852510000000002
    14
    SUPPLAI0x15987d862fbc435ac8445e809ebb377fb418ef8e3810000000002
    15
    PAWKINS0xa15e8a446fa2a4404329028e126f8d0d704f11412268499999000.00000012
    16
    NEUS0x1d9ccbe51cc6b4deeeca686d409561cf9f801fbc7710000000001
    17
    LGP0xddc330761761751e005333208889bfe36c6e6760951000000001
    18
    IMPACT0x2b62ab4f6537cc3e7a90cdc2284a8103f9bd58224710000000001
    19
    NOCAP0xc1404a86d2c3a00a4946ee3289c6b238257be7006510000000001
    20
    SOLAR0x1772a283501b108c0f0016224518ff38db72de2f1681000000001
    59
    4KB
    3s