select a.*,b.ptcount from ptrydygx a where a.ptid=(${ptid}) and a.salesmanid=(${salesmanid}) join (select salesmanid,count(*) as ptcount from ptrydygx group by salesmanid)b on a.salesmanid=b.salesmanid order by salesmanid第二行where不加的话能正常执行,加了以后就报错了,是我加的位置不对?