-- 520 peer 今天 OP4xx 记录
SELECT oprno, craft, content, LEFT(sn,5) AS prefix, COUNT(*) cnt
FROM mes_product_record
WHERE line_sn='XT'
  AND craft='100000'
  AND content IN ('OK','NG')
  AND oprno LIKE 'OP4%'
  AND update_date >= CURDATE()
GROUP BY oprno, content, LEFT(sn,5)
ORDER BY oprno;
