03_b10.sql 566 B

12345678910111213141516171819
  1. --03、网运成本预算完成进度(集团口径)
  2. ---北10(顺序:北京 天津 河北 山西 内蒙古 辽宁 吉林 黑龙江 山东 河南)
  3. select
  4. smonth as MONTH_ID,
  5. '北10' as ZB_TYPE,
  6. sname as PROV_NAME,
  7. null as CITY_ID,
  8. null as CITY_NAME,
  9. null as GRID_ID,
  10. null as GRID_NAME,
  11. '3' as ZB_CODE,
  12. '网运成本预算完成进度(集团口径)' as ZB_NAME,
  13. '是' as IS_RATIO,
  14. column1 as QZ_FZ,
  15. column2 as QZ_FM,
  16. case when column2=0 then 1 else column1/column2 end as BY_QZ
  17. from sqmdb_cost.report50002
  18. where sname in('北京','天津','河北','山西','内蒙古','辽宁','吉林','黑龙江','山东','河南')
  19. and smonth='202207'