16_city.sql 546 B

12345678910111213141516171819202122
  1. --16、单站铁塔租赁费(月)
  2. ---地市
  3. select
  4. c.smonth as MONTH_ID,
  5. '地市' as ZB_TYPE,
  6. '河北' as PROV_NAME,
  7. dg.city_code*100 as CITY_ID,
  8. c.city_name as CITY_NAME,
  9. null as GRID_ID,
  10. null as GRID_NAME,
  11. '16' as ZB_CODE,
  12. '单站铁塔租赁费(月)' as ZB_NAME,
  13. '否' as IS_RATIO,
  14. c.tower_cost as QZ_FZ,
  15. c.tower_num_avg as QZ_FM,
  16. (c.tower_cost/c.tower_num_avg)/6 as BY_QZ
  17. from sqmdb_cost.rpt_tower_cost_city c
  18. left join
  19. (select distinct city_code,city_sname from sqmdb_cost.dict_grid) dg
  20. on c.city_name=dg.city_sname
  21. where smonth='202206'
  22. order by dg.city_code