Mrfti2024-03-23 02:32 PM copy
    Updated 2025-01-02
    -- forked from 2024-03-23 02:32 PM @ https://flipsidecrypto.xyz/studio/queries/fc348c49-98b4-47e0-8ad0-81b6b06d7c0e

    with database AS
    (with general as (
    with tbl3 as (
    with tbl as (
    select
    to_address as "Address",
    sum(amount) as "Input"
    from
    avalanche.core.ez_token_transfers
    where
    contract_address = lower ('0x184ff13B3EBCB25Be44e860163A5D8391Dd568c1')
    group by
    1
    ),
    tbl2 as (
    select
    from_address as "Address",
    sum(amount) as "Output"
    from
    avalanche.core.ez_token_transfers
    where
    contract_address = lower ('0x184ff13B3EBCB25Be44e860163A5D8391Dd568c1')
    group by 1
    )
    select
    tbl."Address",
    case
    when "Input" is null then 0
    else "Input"
    end as "Input tokens",
    case
    when "Output" is null then 0
    else "Output"
    end as "Output tokens"
    Auto-refreshes every 12 hours
    QueryRunArchived: QueryRun has been archived