28_city.sql 495 B

12345678910111213141516171819202122
  1. --28、单OLT承载活动ONU数
  2. ---地市
  3. select
  4. oo.smonth as MONTH_ID,
  5. '地市' as ZB_TYPE,
  6. '河北' as PROV_NAME,
  7. oo.city_code*100 as CITY_ID,
  8. dg.city_name as CITY_NAME,
  9. null as GRID_ID,
  10. null as GRID_NAME,
  11. '28' as ZB_CODE,
  12. '单OLT承载活动ONU数' as ZB_NAME,
  13. '否' as IS_RATIO,
  14. null as QZ_FZ,
  15. null as QZ_FM,
  16. olt_active_onu as BY_QZ
  17. from sqmdb_cost.olt_onu oo
  18. join
  19. (select distinct city_code,city_name from sqmdb_cost.dict_grid) dg
  20. on oo.city_code=dg.city_code
  21. where oo.smonth='202206'
  22. order by oo.city_code