Quality Control – products sold for the first time in 2026. This can be used to check if guides and downloads exist

SELECT
    p.sku AS `SKU`,
    pn.value AS `Name`,
    GROUP_CONCAT(
        DISTINCT cn.value
        ORDER BY cn.value
        SEPARATOR ', '
    ) AS `Category`,
    DATE(p.created_at) AS `Create Date`,
    DATE(fs.first_sale_date) AS `First Sold Date`

FROM catalog_product_entity p

LEFT JOIN catalog_product_entity_varchar pn
    ON pn.entity_id = p.entity_id
   AND pn.store_id = 0
   AND pn.attribute_id = (
        SELECT attribute_id
        FROM eav_attribute
        WHERE attribute_code = 'name'
          AND entity_type_id = (
              SELECT entity_type_id
              FROM eav_entity_type
              WHERE entity_type_code = 'catalog_product'
          )
   )

LEFT JOIN catalog_category_product ccp
    ON ccp.product_id = p.entity_id

LEFT JOIN catalog_category_entity_varchar cn
    ON cn.entity_id = ccp.category_id
   AND cn.store_id = 0
   AND cn.attribute_id = (
        SELECT attribute_id
        FROM eav_attribute
        WHERE attribute_code = 'name'
          AND entity_type_id = (
              SELECT entity_type_id
              FROM eav_entity_type
              WHERE entity_type_code = 'catalog_category'
          )
   )

INNER JOIN (
    SELECT
        soi.product_id,
        MIN(so.created_at) AS first_sale_date
    FROM sales_order_item soi
    INNER JOIN sales_order so
        ON so.entity_id = soi.order_id
    WHERE so.status = 'complete'
      AND soi.product_id IS NOT NULL
    GROUP BY soi.product_id
    HAVING MIN(so.created_at) >= '2026-01-01'
       AND MIN(so.created_at) <  '2027-01-01'
) fs
    ON fs.product_id = p.entity_id

GROUP BY
    p.entity_id,
    p.sku,
    pn.value,
    p.created_at,
    fs.first_sale_date

ORDER BY
    fs.first_sale_date ASC,
    p.sku;
What are your feelings
Updated on September 15, 2026