Mrfti2023-10-24 07:09 PM
    Updated 2023-10-24
    -- forked from Holders analysis @ https://flipsidecrypto.xyz/edit/queries/2195c9fe-2f96-4bf1-a506-746619fc10f5
    -- forked from Abbas_ra21 / Top Holders 3 @ https://flipsidecrypto.xyz/Abbas_ra21/q/7XcncLy2HEoU/top-holders-3
    (
    with
    price AS (
    select
    date_trunc(Day,hour) AS Day,
    price AS TOKEN_Price
    from
    crosschain.price.ez_hourly_token_prices
    where
    TOKEN_address = lower('0xdf3ac4F479375802A821f7b7b46Cd7EB5E4262cC')
    AND BLOCKCHAIN = 'ethereum'
    group by 1,2
    ),
    bal AS (
    select
    FROM_ADDRESS AS user,
    -sum(amount) AS Amt
    from
    ethereum.core.ez_token_transfers
    where
    Contract_ADDRESS = lower('0xdf3ac4F479375802A821f7b7b46Cd7EB5E4262cC')
    group by
    1
    union ALL
    select
    TO_ADDRESS AS user,
    sum(amount) AS Amt
    from
    ethereum.core.ez_token_transfers
    where
    Contract_ADDRESS = lower('0xdf3ac4F479375802A821f7b7b46Cd7EB5E4262cC')
    group by
    1
    ),
    Run a query to Download Data