select count(fyid) as appesfddpc from (select fyid,count(fyid) counts from jy510_esf_zhuzhai WHERE sfsh=1 AND fsxx like '%344%' AND fylx=1 AND hx LIKE '4%' group by xqid,mj,szlc ) temp