12345678910111213141516171819202122232425 |
- --10、修理维护费占收比(省内口径)
- select
- cs.smonth as MONTH_ID,
- '地市' as ZB_TYPE,
- '河北' as PROV_NAME,
- dg.city_code*100 as CITY_ID,
- cs.sname as CITY_NAME,
- null as GRID_ID,
- null as GRID_NAME,
- '10' as ZB_CODE,
- '修理维护费占收比(省内口径)' as ZB_NAME,
- '是' as IS_RATIO,
- cs.cost_fix as QZ_FZ,
- r.column4 as QZ_FM,
- cs.cost_fix/r.column4 as BY_QZ
- from sqmdb_cost.chengben_shengnei cs
- join sqmdb_cost.report80040 r on cs.smonth=r.smonth and cs.sname=r.sname
- join
- (select distinct city_code,city_pro from sqmdb_cost.dict_grid) dg
- on cs.sname=dg.city_pro
- where r.period_type='M'
- and cs.stype='地市'
- and cs.smonth='202206'
- order by dg.city_code
|