select province
from (select *
from (select 'GD' as
province, 0 as hrl
from
dual
union all
select 'BJ' as province, 0 as
hrl
from
dual
union all
select 'SH' as province, 0 as
hrl
from
dual
union all
select 'GS' as province, 0 as
hrl
from
dual
union all
select 'LN' as province, 0 as
hrl
from
dual
union all
select 'HA' as province, 0 as
hrl
from
dual
union all
select 'JS' as province, 0 as
hrl
from
dual
union all
select 'SC' as province, 0 as
hrl
from
dual
union all
select 'SD' as province, 0 as
hrl
from
dual
union all
select 'XJ' as province, 0 as
hrl
from
dual
union all
select 'ZJ' as province, 0 as
hrl
from
dual
union all
select 'HB' as province, 0 as
hrl
from
dual
union all
select 'FJ' as province, 0 as
hrl
from
dual
union all
select 'HL' as province, 0 as
hrl
from
dual
union all
select 'HE' as province, 0 as
hrl
from
dual
union all
select 'JL' as province, 0 as
hrl
from
dual
union all
select 'TJ' as province, 0 as
hrl
from
dual
union all
select 'YN' as province, 0 as
hrl
from
dual
union all
select 'HN' as province, 0 as
hrl
from
dual
union all
select 'AH' as province, 0 as
hrl
from
dual
union all
select 'SX' as province, 0 as
hrl
from
dual
union all
select 'SN' as province, 0 as
hrl
from
dual
union all
select 'JX' as province, 0 as
hrl
from
dual
union all
select 'GZ' as province, 0 as
hrl
from
dual
union all
select 'NM' as province, 0 as
hrl
from
dual
union all
select 'GX' as province, 0 as
hrl
from
dual
union all
select 'CQ' as province, 0 as
hrl
from
dual
union all
select 'NX' as province, 0 as
hrl
from
dual
union all
select 'HI' as province, 0 as
hrl
from
dual
union all
select 'QH' as province, 0 as
hrl
from
dual
union all
select 'XZ' as province, 0 as
hrl
from
dual
union all
select 'WFQF' as province, 0
as hrl
from
dual)
union all (select decode(t.province,
null,
'WFQF',
'无法区分归属地',
'WFQF',
'广东',
'GD',
'北京',
'BJ',
'上海',
'SH',
'甘肃',
'GS',
'辽宁',
'LN',
'河南',
'HA',
'江苏',
'JS',
'四川',
'SC',
'山东',
'SD',
'新疆',
'XJ',
'浙江',
'ZJ',
'湖北',
'HB',
'福建',
'FJ',
'黑龙江',
'HL',
'河北',
'HE',
'吉林',
'JL',
'天津',
'TJ',
'云南',
'YN',
'湖南',
'HN',
'安徽',
'AH',
'山西',
'SX',
'陕西',
'SN',
'江西',
'JX',
'贵州',
'GZ',
'内蒙古',
'NM',
'广西',
'GX',
'重庆',
'CQ',
'宁夏',
'NX',
'海南',
'HI',
'青海',
'QH',
'西藏',
'XZ') province,
sum(t.h80 + t.h85 + t.h8500 + t.h5100) hrl
from REPORT_PROVINCE t
where substr(t.s_date, 1, 6) = 201405
group by decode(t.province,
null,
'WFQF',
'无法区分归属地',
'WFQF',
'广东',
'GD',
'北京',
'BJ',
'上海',
'SH',
'甘肃',
'GS',
'辽宁',
'LN',
'河南',
'HA',
'江苏',
'JS',
'四川',
'SC',
'山东',
'SD',
'新疆',
'XJ',
'浙江',
'ZJ',
'湖北',
'HB',
'福建',
'FJ',
'黑龙江',
'HL',
'河北',
'HE',
'吉林',
'JL',
'天津',
'TJ',
'云南',
'YN',
'湖南',
'HN',
'安徽',
'AH',
'山西',
'SX',
'陕西',
'SN',
'江西',
'JX',
'贵州',
'GZ',
'内蒙古',
'NM',
'广西',
'GX',
'重庆',
'CQ',
'宁夏',
'NX',
'海南',
'HI',
'青海',
'QH',
'西藏',
'XZ')))
group by province
order by sum(hrl) desc
加载中,请稍候......