savvyonchainFINDING WHALES WALLETS copy
    Updated 2024-11-02
    -- forked from FINDING WHALES WALLETS @ https://flipsidecrypto.xyz/studio/queries/71e7c13b-713e-446d-affa-734f2dc72d33
    with table_content as (
    select
    block_timestamp,
    tx_hash,
    from_address,
    to_address,
    amount,
    amount_usd as usd_value
    from
    arbitrum.core.ez_token_transfers
    where
    block_timestamp :: date >= '2024-01-01'
    and contract_address = lower('0x912CE59144191C1204E64559FE8253a0e49E6548')
    ),
    -- amount of the token received by each wallet
    token_in as (
    select
    block_timestamp,
    to_address as address,
    amount as token_amount,
    usd_value
    from
    table_content
    ),
    -- amount of the token sent out of each
    token_out as (
    select
    block_timestamp,
    from_address as address,
    - amount as token_amount,
    usd_value
    from
    table_content
    ),
    cummulative_sum as (
    QueryRunArchived: QueryRun has been archived