adele23Token Transfers
    Updated 2025-03-07
    with raw as (
    select -- all columns below are useful
    block_timestamp,
    tx_hash,
    event_index, -- all transactions and all the events within a block
    from_address,
    to_address,
    contract_address, -- all non-native tokens have contract addresses, for exaple usdt, usdc, weth
    symbol,
    amount, -- raw_amount (use for obscure, or new tokens) needs to be devided by decimal cases and you get amount
    from ethereum.core.ez_token_transfers
    where block_timestamp::date >= '2024-08-01'
    and contract_address IN (
    '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' -- usdc
    , lower('0xdAC17F958D2ee523a2206206994597C13D831ec7') -- usdt
    )
    -- and symbol in ('USDT', 'USDC') -- do not do this, symbols are not unique
    )
    -- the above code filters to usdt and usdc

    select
    date_trunc('day', block_timestamp) as day,
    contract_address,
    symbol,
    sum(amount) as daily_amount
    from raw
    group by all -- you can now compare results between the different contact addresses

    -- exercise: compare the number of times stablecoins are sent - usdc, usdt, dai, in February 2025
    -- exercise: how much % of nfts do the top 5 hold for pudgy penguins