freemartianTotal List & Delist
    Updated 2024-04-12
    with datas AS (
    SELECT
    block_number,
    block_timestamp,
    version,
    tx_hash,
    success,
    payload_function,
    event_resource,
    event_address,
    event_data,
    event_data:amount AS quantity,
    event_data:listing_id AS listing_id,
    event_data:seller AS seller,
    event_data:price/pow(10,8) AS list_price,
    event_data:token_id:token_data_id:collection AS collection_name,
    event_data:token_id:token_data_id:name AS nft_id,
    event_data:token_id:token_data_id:creator AS collection_creator,
    account_address AS platform_address,
    'Topaz' AS platform_name

    FROM aptos.core.fact_events
    WHERE event_module = 'events'
    AND account_address = '0x2c7bccf7b31baf770fdbcc768d9e9cb3d87805e255355df5db32ac9a669010a2'
    AND event_resource IN ('ListEvent','DelistEvent')

    ORDER BY 2 DESC
    )

    SELECT
    event_resource,
    COUNT(tx_hash) AS transactions,
    COUNT(DISTINCT seller) AS sellers,
    SUM(quantity) AS nft_count,
    SUM(list_price) AS volume,
    COUNT(DISTINCT collection_name) AS collection_count,
    Auto-refreshes every 1 hour
    QueryRunArchived: QueryRun has been archived