permaryTotal Pixel recieved as rewards
    Updated 2025-04-03
    WITH rewards AS (
    SELECT
    tx_hash AS hash
    FROM ronin.core.fact_transactions
    WHERE to_address = '0x0e6bce8f215c52b53fad009e3bfacbb3be3774a6'
    AND origin_function_signature = '0x9ca96ce0'
    ),

    pixel_rewards AS (
    SELECT
    to_address AS player,
    SUM(amount) AS total_pixels_earned
    FROM ronin.core.ez_token_transfers
    WHERE contract_address = '0x7eae20d11ef8c779433eb24503def900b9d28ad7'
    AND from_address = '0x0e6bce8f215c52b53fad009e3bfacbb3be3774a6'
    AND tx_hash IN (SELECT hash FROM rewards)
    GROUP BY to_address
    )

    SELECT player, total_pixels_earned
    FROM pixel_rewards
    ORDER BY total_pixels_earned DESC;