Pine AnalyticsONDO 7 copy
    Updated 2025-03-05
    -- forked from ONDO 7 @ https://flipsidecrypto.xyz/edit/queries/cbfd0825-99f5-4c18-97b9-641f25afebf4

    with tab1 as (
    SELECT
    user,
    min(date(block_timestamp)) as first_day,
    max(date(block_timestamp)) as last_day,
    sum(
    CASE when flow LIKE 'in' then AMOUNT_PRECISE else -AMOUNT_PRECISE end
    ) as balance
    FROM (
    SELECT
    from_address as user,
    block_timestamp,
    'out' as flow,
    AMOUNT_PRECISE
    FROM ethereum.core.ez_token_transfers
    WHERE contract_address LIKE lower('0x1B19C19393e2d034D8Ff31ff34c81252FcBbee92')
    UNION all
    SELECT
    to_address as user,
    block_timestamp,
    'in' as flow,
    AMOUNT_PRECISE
    FROM ethereum.core.ez_token_transfers
    WHERE contract_address LIKE lower('0x1B19C19393e2d034D8Ff31ff34c81252FcBbee92')
    )
    WHERE not user LIKE '0x0000000000000000000000000000000000000000'
    GROUP BY 1
    UNION all
    Last run: about 2 months ago
    WEEK
    HOLDERS
    AMT
    1
    2025-01-06 00:00:00.000382
    2
    2024-12-16 00:00:00.000392
    3
    2024-10-28 00:00:00.000502
    4
    2024-09-23 00:00:00.000512
    5
    2024-07-22 00:00:00.000492
    6
    2024-05-13 00:00:00.000432
    7
    2024-04-22 00:00:00.000442
    8
    2024-04-01 00:00:00.000392
    9
    2024-03-04 00:00:00.000422
    10
    2023-12-04 00:00:00.000572
    11
    2023-11-20 00:00:00.000582
    12
    2023-11-06 00:00:00.000592
    13
    2023-10-30 00:00:00.000602
    14
    2023-09-04 00:00:00.000502
    15
    2023-08-28 00:00:00.000502
    16
    2023-07-03 00:00:00.000422
    17
    2023-06-05 00:00:00.000412
    18
    2023-04-24 00:00:00.000322
    19
    2023-04-17 00:00:00.000312
    20
    2023-04-10 00:00:00.000302
    24
    792B
    6s