SELECT a.*, count(b.id) as num FROM `tcyun_exam` `a` INNER JOIN `tcyun_exam_question` `b` ON `a`.`id`=`b`.`examid` WHERE `a`.`id` IN ('15','16','17','18','19','20','21','22','23','24','25','26','27','73','74','75','113','114','203','404','405','406','407','408','409','410','411','412','413','414','417','418','422','784','1232','1437','1438','1439','1440','1441','1540','1590','1591','1618','1619','1625','1627','1631','1633','1945','1951','1968','2096','2102','2103','2104','2105','2106','2107','2108','2109','2110','2111','2112','2113','2114','2115','2116','2117','2118','2119','2120','2121','2122','2123','2124','2125','2126','2127','2271','2445','2447','2758') AND `a`.`cate` = '3' GROUP BY `b`.`examid`