martinezpoa flow
    Updated 2023-05-15
    WITH
    nft_mints AS (
    SELECT
    nft_id,
    MIN(block_timestamp) AS first_mint
    FROM
    flow.core.ez_nft_sales
    GROUP BY
    1
    ),
    nft_sales AS (
    SELECT
    block_timestamp,
    nft_id,
    nft_collection,
    seller,
    buyer
    FROM
    flow.core.ez_nft_sales sales
    WHERE
    nft_collection in ('A.d0bcefdf1e67ea85.HWGarageCard','A.d0bcefdf1e67ea85.HWGarageCardV2')
    ),
    data AS (
    SELECT
    DATE_TRUNC (day, block_timestamp) AS date,
    nft_collection as collection_version,
    COUNT(*) AS sales,
    sum (sales) over (partition by collection_version order by date) as total_sales,
    COUNT(DISTINCT nft_id) AS mints,
    sum (mints) over (partition by collection_version order by date) as total_mints,
    COUNT(DISTINCT seller) AS sellers,
    COUNT(DISTINCT buyer) AS buyers
    FROM
    nft_sales
    GROUP BY
    1,2
    Run a query to Download Data