123456789101112131415161718192021 |
- --15、活动ONU单端口能耗(月)
- ---地市
- select
- t1.smonth,
- t1.city_name,
- t1.cost_nenghao/10000 as cost_nenghao,
- t2.active_onu_num/10000 as active_onu_num,
- t1.cost_nenghao/t2.active_onu_num as cost_onu
- from
- (select distinct a.smonth,dg.city_name,a.cost_nenghao from
- (select smonth,sname,stype,
- (column5+column19+column27+column41+column49+column57+column70+column78+column86+column94+column100+column108+column115)-column5-column19-column108 as cost_nenghao
- from sqmdb_cost.report50 r
- where stype ='北方省汇总展现'
- and sname in ('石家庄_河北','唐山_河北','秦皇岛_河北','邯郸_河北','邢台_河北','保定_河北','张家口_河北','承德_河北','廊坊_河北','沧州_河北','衡水_河北','雄安_河北')
- and smonth='202203') a
- join sqmdb_cost.dict_grid dg
- on a.sname=dg.city_pro) t1
- join
- (select * from sqmdb_cost.active_onu) t2
- on t1.city_name=t2.city_name
|