SQL语句
SELECT a.pnl_id, a.prod_nbr, a.lcm_owner, a.oper, a.equip_nbr, a.serial_no, a.cart_id, a.pallet_id, a.cst_id, a.wo_nbr, a.cur_hold_code, a.grade, b.hold_flag,
a.trans_date, a.lcd_prod_nbr, a.lcd_grade,c.dfct_code
FROM wp_pnlhist a
LEFT JOIN
(SELECT pnl_id, hold_flag
FROM wp_pnlstat) b ON a.pnl_id = b.pnl_id
left join hmashis_defectcode@phars c
on a.pnl_id=c.entity_no
WHERE fac_id = 'A' AND a.pnl_id IN ('T5781166AA01')
ORDER BY pnl_id,
prod_nbr,
lcm_owner,
oper,
equip_nbr,
serial_no,
cart_id,
pallet_id,
cst_id,
wo_nbr,
cur_hold_code,
grade,
hold_flag,
trans_date,
lcd_prod_nbr,
lcd_grade
这个查出来每条结果都重复一次,是什么原因?要怎么改啊?帮帮忙