select
max(case name when '授权' then num end) as 'fmzlsq',
max(case name when '撤回' then num end) as 'fmzlch',
max(case name when '实审' then num end) as 'fmzlss',
max(case name when '公开' then num end) as 'fmzlgk',
max(case name when '终止' then num end) as 'fmzlzz'
from (
select count(a.credit_code) num,a.patent_legal_status name
from enterprise_patent a
where a.credit_code='91110108551385082Q' and a.patent_type='fmzl'
group by a.patent_legal_status,a.credit_code
) b