26_city.sql 587 B

1234567891011121314151617181920212223
  1. --26、H端口实占率
  2. ---地市新版(使用baobiao_ipduankou整理)
  3. select
  4. month_id as MONTH_ID,
  5. '地市' as ZB_TYPE,
  6. '河北' as PROV_NAME,
  7. city_code*100 as CITY_ID,
  8. city_name as CITY_NAME,
  9. null as GRID_ID,
  10. null as GRID_NAME,
  11. '26' as ZB_CODE,
  12. 'H端口实占率' as ZB_NAME,
  13. '是' as IS_RATIO,
  14. port_inuse as QZ_FZ,
  15. port_total as QZ_FM,
  16. port_rate as BY_QZ
  17. from
  18. (select month_id,city_name,
  19. port_total,port_inuse,port_rate from sqmdb_cost.jt_number_city jnc where month_id='202206') a
  20. join
  21. (select distinct city_code,city_sname from sqmdb_cost.dict_grid) dg
  22. on a.city_name=dg.city_sname
  23. order by city_code