elsina2024-07-20: single numbers 24h
    Updated 2024-08-23
    with new_users AS (
    SELECT
    buyer_address as user,
    MIN(block_timestamp) AS date
    FROM
    near.nft.ez_nft_sales
    GROUP BY
    user
    )


    SELECT
    COUNT(DISTINCT tx_hash) AS total_transaction_count,
    COUNT(DISTINCT buyer_address) AS unique_buyer_count,
    COUNT(DISTINCT seller_address) AS unique_seller_count,
    SUM(price_usd) AS total_transaction_volume,
    sum(platform_fee_usd) as platform_fee,
    (SELECT COUNT(*)
    FROM new_users
    WHERE date::date = current_date - interval '1 day') AS new_user_count
    FROM
    near.nft.ez_nft_sales
    WHERE
    block_timestamp::date = current_date - interval '1 day'
    QueryRunArchived: QueryRun has been archived