select t.county,t.status_project,count(1) from XM_SEWAGEWORK_INFO t group by t.county,t.status_project
COUNT (CASE WHEN status_project = 'BGS' THEN 1 ELSE NULL END) cstatus_1,
COUNT (CASE WHEN status_project = 'ZHL' THEN 1
ELSE NULL
END) cstatus_2,county
from XM_SEWAGEWORK_INFO t group by t.county