victor-sanzcapdetTotal NFT mints
    Updated 2025-01-28
    WITH event_data AS (
    -- Seleccionamos los datos de interés del evento
    SELECT
    e.event_resource,
    PARSE_JSON(e.event_data):index:value AS mint_value,
    PARSE_JSON(e.event_data):collection AS collection_address,
    PARSE_JSON(e.event_data):to AS to_address,
    PARSE_JSON(e.event_data):amount AS amount_value,
    e.tx_hash
    FROM
    aptos.core.fact_events e
    WHERE
    date_trunc('day', e.block_timestamp) > '2024-09-01'
    AND e.event_module = 'collection'
    )

    -- Calculamos los valores totales
    SELECT
    COUNT(DISTINCT CASE WHEN event_resource = 'Mint' THEN mint_value END) AS total_nft_mints,
    COUNT(DISTINCT CASE WHEN event_resource = 'TransferEvent' THEN to_address END) AS total_unique_minters,
    SUM(CASE WHEN event_resource = 'DepositEvent' THEN amount_value / POW(10,8) END) AS total_sales_volume
    FROM
    event_data
    WHERE
    collection_address = '0xe611f3bfd29526f90015d968c6c1f586f973d18cd8075644fee9c68ea14f4581';


    Last run: 3 months ago
    TOTAL_NFT_MINTS
    TOTAL_UNIQUE_MINTERS
    TOTAL_SALES_VOLUME
    1
    23750
    1
    15B
    30s