Updated 2024-08-02
    WITH recent_transactions AS (
    SELECT
    tx_hash,
    block_number,
    block_timestamp,
    tx_position,
    trace_index,
    origin_from_address,
    origin_to_address,
    origin_function_signature,
    amount,
    amount_usd
    FROM
    ethereum.core.ez_native_transfers
    WHERE
    block_timestamp >= DATEADD(hour, -24, CURRENT_TIMESTAMP)
    AND amount_usd > 10
    ),
    labels AS (
    SELECT
    address,
    label,
    label_subtype,
    label_type
    FROM
    ethereum.core.dim_labels
    ),
    filtered_balances AS (
    SELECT
    user_address,
    balance AS current_balance,
    block_number,
    ROW_NUMBER() OVER (PARTITION BY user_address ORDER BY block_number DESC) AS rnk
    FROM
    ethereum.core.fact_eth_balances
    WHERE
    QueryRunArchived: QueryRun has been archived