SELECT * FROM tzxpf,iorder WHERE Mxpfid IN (SELECT Mxpfid FROM tzxpf,iorder where tzxpf.partsno=iorder.G and tzxpf.partsqua=iorder.f GROUP BY Mxpfid HAVING count(*)>1) order by Mxpfid