--31、宽带用户光衰质差率 ---地市 select k.smonth as MONTH_ID, '地市' as ZB_TYPE, '河北' as PROV_NAME, dg.city_code*100 as CITY_ID, trim(k.city_name) as CITY_NAME, null as GRID_ID, null as GRID_NAME, '31' as ZB_CODE, '宽带用户光衰质差率' as ZB_NAME, '是' as IS_RATIO, k.low_27 as QZ_FZ, k.onu_all as QZ_FM, k.low_27/k.onu_all as BY_QZ from sqmdb_cost.kd_low_quality k join (select distinct city_code,city_sname from sqmdb_cost.dict_grid) dg on trim(k.city_name)=trim(dg.city_sname) where k.smonth='202206' order by dg.city_code