SELECT SUBSTRING_INDEX(CONCAT(SUBSTRING_INDEX(a.XXX,'市',1),'市'),'省',-1)as 'city' from (SELECT XXX,factory_name from sewage_plant)a