/*
latest - transfers
*/
--- LATEST HOLDERS OF XSGD TOKEN (CA: 0xb2f85b7ab3c2b6f62df06de6ae7d09c010a5096e)
--- https://snowscan.xyz/ (AVAX blockchain explorer)
with raw as (
select
block_timestamp,
from_address,
to_address,
amount
from avalanche.core.ez_token_transfers
where contract_address = '0xb2f85b7ab3c2b6f62df06de6ae7d09c010a5096e'
and block_timestamp::date = '2025-03-18'
),
direction as (
select
block_timestamp,
to_address as address,
amount
from raw
union all
select
block_timestamp,
from_address as address,
-amount as amount
from raw
)