Zanyar_98Number of participants on networks
    Updated 2022-09-20
    WITH Project_On_Ethereum AS (
    SELECT Contract_Address
    FROM ethereum.core.fact_event_logs
    WHERE ORIGIN_TO_ADDRESS='0x7603a35af5cf10b113f167d424eb75bb7062c8ce' AND
    ORIGIN_FUNCTION_SIGNATURE = '0xfa18022c' AND EVENT_NAME='AuctionTimeUpdated'),

    ETHEREUM AS (SELECT COUNT(DISTINCT(FROM_ADDRESS)) AS "Number of participants", 'Ethereum' AS NETWORK
    FROM ethereum.core.fact_transactions
    WHERE To_ADDRESS IN (SELECT Contract_Address FROM Project_On_Ethereum)
    ),

    Project_On_BSC AS (
    SELECT Contract_Address
    FROM bsc.core.fact_event_logs
    WHERE ORIGIN_TO_ADDRESS='0x5629ce74ddcad7cc72b3ea30444da7172ad851d9' AND
    ORIGIN_FUNCTION_SIGNATURE = '0xfa18022c' AND EVENT_NAME='AuctionTimeUpdated'),

    BSC AS (SELECT COUNT(DISTINCT(FROM_ADDRESS)) AS "Number of participants", 'BSC' AS NETWORK
    FROM bsc.core.fact_transactions
    WHERE To_ADDRESS IN (SELECT Contract_Address FROM Project_On_BSC)
    ),
    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'),

    Polygon AS (SELECT 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)
    ),

    Project_On_Avalanche AS (
    SELECT Contract_Address
    FROM avalanche.core.fact_event_logs
    Run a query to Download Data