WITH Project_On_Polygon AS (
SELECT Contract_Address
FROM polygon.core.fact_event_logs
WHERE ORIGIN_TO_ADDRESS='0xc040f84cf7046409f92d578ef9040fe45e6ef4be' AND
ORIGIN_FUNCTION_SIGNATURE = '0xfa18022c' AND EVENT_NAME='AuctionTimeUpdated')
SELECT COUNT(DISTINCT(FROM_ADDRESS)) AS "Number of participants", To_ADDRESS AS "Auction"
FROM polygon.core.fact_transactions
WHERE To_ADDRESS IN (SELECT Contract_Address FROM Project_On_Polygon)
GROUP BY "Auction"
ORDER BY "Number of participants" DESC
LIMIT 3