SELECT replace(query,'manufacturer_id=', '') as city_id1, keyword, (select name from city c where c.city_id = city_id1 ) as name, (select count(product_id) from oc_product where CityID = city_id1 and EventDate > NOW()) as count FROM `oc_seo_url` where query like 'manufacturer_id=%' order by name