jackguyeth stablecoin 2
    Updated 2023-12-18
    -- forked from eth stablecoin 1 @ https://flipsidecrypto.xyz/edit/queries/59592450-c832-42f7-9765-4abe9c3269db

    with tab1 as (
    SELECT
    date_trunc('week', block_timestamp) as week,
    'Ethereum' as chain,
    tx_hash as transactions,
    ORIGIN_FROM_ADDRESS as users,
    AMOUNT as volume
    FROM ethereum.core.ez_token_transfers
    WHERE contract_address in (
    lower('0xdAC17F958D2ee523a2206206994597C13D831ec7'),
    lower('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'),
    lower('0x6B175474E89094C44Da98b954EedeAC495271d0F'),
    lower('0x0000000000085d4780B73119b644AE5ecd22b376'),
    lower('0x0C10bF8FcB7Bf5412187A595ab97a3609160b5c6'),
    lower('0x853d955aCEf822Db058eb8505911ED77F175b99e'),
    lower('0x8E870D67F660D95d5be530380D0eC0bd388289E1')
    )
    AND block_timestamp > '2022-01-01'
    and not date_trunc('week', block_timestamp) = date_trunc('week', current_date)
    UNION all
    SELECT
    date_trunc('week', block_timestamp) as week,
    'Optimism' as chain,
    tx_hash as transactions,
    ORIGIN_FROM_ADDRESS as users,
    AMOUNT as volume
    FROM optimism.core.ez_token_transfers
    WHERE contract_address in (
    lower('0x94b008aA00579c1307B0EF2c499aD98a8ce58e58'),
    lower('0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85'),
    lower('0x7F5c764cBc14f9669B88837ca1490cCa17c31607'),
    Run a query to Download Data