SELECT 
    ptype.pro_type AS product_name,
    COUNT(rep.rep_uid) AS product_count,
    COUNT(DISTINCT vo.vo_rep_uid) AS vendor_involved
FROM tbl_repair rep
JOIN tbl_inventory inv ON inv.inv_uid = rep.rep_inv_uid
JOIN tbl_product_type ptype ON ptype.pro_uid = inv.pro_uid
LEFT OUTER JOIN tbl_ven_out vo 
    ON vo.vo_rep_uid = rep.rep_uid
    AND vo.vo_out_dt BETWEEN '2025-02-01' AND '2025-02-28'
WHERE rep.rep_rec_date BETWEEN '2025-02-01' AND '2025-02-28'
GROUP BY  ptype.pro_type
ORDER BY  ptype.pro_type;