SandeshRecent large movements
    Updated 2025-01-13
    /*
    Purpose:
    This query retrieves the top 50 largest token transfer transactions across Ethereum, base and Arbitrum over the past 7 days.
    It identifies whether the sender is a contract or a user wallet, and enriches the data with project and label information.
    */

    -- CTE to extract Ethereum token transfers within the last 7 days
    WITH eth_transfers AS (
    SELECT
    block_timestamp,
    from_address,
    amount,
    amount_usd,
    to_address,
    tx_hash,
    'ethereum' AS chain
    FROM ethereum.core.ez_token_transfers
    WHERE 1=1
    AND block_timestamp >= CURRENT_DATE - INTERVAL '7 days'
    AND contract_address = '0xCF67815ccE72E682Eb4429eCa46843bed81Ca739' -- G3 Token address on Ethereum
    ),

    -- CTE to extract Arbitrum token transfers within the last 7 days
    arb_transfers AS (
    SELECT
    block_timestamp,
    from_address,
    amount,
    amount_usd,
    to_address,
    tx_hash,
    'arbitrum' AS chain
    FROM arbitrum.core.ez_token_transfers
    WHERE 1=1
    AND block_timestamp >= CURRENT_DATE - INTERVAL '7 days'
    AND contract_address = '0xc24a365a870821eb83fd216c9596edd89479d8d7' -- G3 Token address on Arbitrum
    QueryRunArchived: QueryRun has been archived