SELECT '=== 供应商评价 ===' AS info;
SELECT e.*, s.supplier_name
FROM biz_supplier_evaluation e
LEFT JOIN biz_supplier s ON e.supplier_id = s.supplier_id;

SELECT '=== 报价状态分布 ===' AS info;
SELECT status, COUNT(*) FROM biz_quotation GROUP BY status;

SELECT '=== 供应商报价参与统计 ===' AS info;
SELECT q.supplier_id, s.supplier_name, COUNT(*) AS cnt,
  SUM(CASE WHEN q.status='accepted' THEN 1 ELSE 0 END) AS accepted_cnt
FROM biz_quotation q
LEFT JOIN biz_supplier s ON q.supplier_id = s.supplier_id
GROUP BY q.supplier_id, s.supplier_name
ORDER BY q.supplier_id;
