avax9000_kingMoney path
    Updated 2025-01-09
    WITH airdrop_wallets AS (
    -- Wallets that received the airdrop
    SELECT
    to_address AS airdrop_wallet,
    SUM(amount) AS airdrop_received_amount
    FROM avalanche.core.ez_native_transfers
    WHERE
    from_address IN (
    '0x4a9b9fd6eb02fca83f361ffdfa92c459dd88b141',
    '0x40e661Ee59B30a243c5496EeD6a098b5f8AE5a43')
    OR ORIGIN_FUNCTION_SIGNATURE = '0x0d5818f7'
    AND BLOCK_TIMESTAMP > '2024-12-17'
    GROUP BY to_address
    HAVING
    SUM(amount) <= 3.25
    AND SUM(amount) >= 0.25
    ),

    wallet_transactions AS (
    -- Combine all transactions (swaps, stakes, and bridges)
    SELECT
    ORIGIN_FROM_ADDRESS AS wallet,
    BLOCK_TIMESTAMP,
    'swap' AS transaction_type,
    SYMBOL_IN AS swapped_sold_token,
    SYMBOL_OUT AS swapped_received_token,
    AMOUNT_IN AS transaction_amount,
    NULL AS staked_amount,
    NULL AS token_staked,
    NULL AS bridged_wallet,
    NULL AS bridged_token_symbol,
    NULL AS bridged_destination_chain
    FROM avalanche.defi.ez_dex_swaps
    WHERE SYMBOL_IN IN ('WAVAX', 'AVAX')
    AND SYMBOL_OUT NOT IN ('sAVAX') AND SYMBOL_OUT NOT LIKE '%.e' -- Exclude staking swaps
    AND BLOCK_TIMESTAMP >= '2024-12-20'
    QueryRunArchived: QueryRun has been archived