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 Block_Timestamp::date AS DAYS,COUNT(DISTINCT(FROM_ADDRESS)) AS "Number of participants", 'Polygon' AS NETWORK
FROM polygon.core.fact_transactions
WHERE To_ADDRESS IN (SELECT Contract_Address FROM Project_On_Polygon)
GROUP BY DAYS