cybergenlabOverall token holders
    Updated 2025-02-11
    with token_meta as (
    select
    value:PLATFORM::string as platform,
    value:POOL_ADDRESS::string as pool_address,
    value:TOKEN_NAME::string as name,
    value:TICKER::string as ticker,
    value:TOKEN_ADDRESS::string as token_address,
    value:DECIMALS::numeric as decimals,
    value:SUPPLY::numeric as supply
    from (
    select
    livequery.live.udf_api('https://flipsidecrypto.xyz/api/v1/queries/7aa557ad-d182-4403-b9ca-8a4b774530a3/data/latest') as response
    ), lateral FLATTEN (input => response:data)
    order by 1 desc
    )

    , table_in as (
    select
    date_trunc('day', block_timestamp) as date,
    from_address as holder,
    - amount as amount
    from base.core.ez_token_transfers
    where contract_address= (select token_address from token_meta where ticker = '{{Ticker_list}}')
    )

    , table_out as (
    select
    date_trunc('day', block_timestamp),
    to_address as holder,
    amount as amount
    from base.core.ez_token_transfers
    where contract_address= (select token_address from token_meta where ticker = '{{Ticker_list}}')
    )

    , swap_table as (
    select * from table_in
    Last run: about 2 months ago
    DATE
    UNIQUE_HOLDER
    1
    2024-10-01 00:00:00.0005710
    2
    2024-11-01 00:00:00.00062499
    3
    2024-12-01 00:00:00.000294323
    3
    103B
    38s