12345678910111213141516171819202122232425 |
- --18、单皮长公里线路维护费(月)
- ---北10
- select
- t1.smonth as MONTH_ID,
- '北10' as ZB_TYPE,
- t1.sname as PROV_NAME,
- null as CITY_ID,
- null as CITY_NAME,
- null as GRID_ID,
- null as GRID_NAME,
- '18' as ZB_CODE,
- '单皮长公里线路维护费(月)' as ZB_NAME,
- '否' as IS_RATIO,
- t1.cost_xianlu as QZ_FZ,
- t2.total_gl as QZ_FM,
- t1.cost_xianlu/t2.total_gl/6 as BY_QZ
- from
- (select '202206' as smonth,sname,
- sum(column65+column66+column67+column68+column69)/10000 as cost_xianlu
- from sqmdb_cost.report50
- where sname in ('北京','天津','河北','山西','内蒙古','辽宁','吉林','黑龙江','山东','河南')
- and period_type='M' and smonth between '202201' and '202206' group by sname) t1
- join
- (select sname,total_gl from sqmdb_cost.jt_number_b10 where smonth='202206') t2
- on t1.sname=t2.sname
|