02_b10.sql 508 B

1234567891011121314151617181920
  1. --02、网运成本占收比(省内口径)
  2. select
  3. cs.smonth as MONTH_ID,
  4. '北10' as ZB_TYPE,
  5. cs.sname as PROV_NAME,
  6. null as CITY_ID,
  7. null as CITY_NAME,
  8. null as GRID_ID,
  9. null as GRID_NAME,
  10. '2' as ZB_CODE,
  11. '网运成本占收比(省内口径)' as ZB_NAME,
  12. '是' as IS_RATIO,
  13. cs.cost_total as QZ_FZ,
  14. r.column4 as QZ_FM,
  15. cs.cost_total/r.column4 as BY_QZ
  16. from sqmdb_cost.chengben_shengnei cs
  17. join sqmdb_cost.report80040 r on cs.smonth=r.smonth and cs.sname=r.sname
  18. where r.period_type='M'
  19. and cs.stype='北10'
  20. and cs.smonth='202207'