select sum(case when value='sh' then 1 esle 0 end) sh, sum(case when value='bj' then 1 esle 0 end) bj,name from tablegroup by name
左转数学吧——from here’s to change 8❎