1234567891011121314151617181920 |
- ---Íø¸ñ
- ---chengben_other_4_grid_202203.csv
- select
- grid.smonth as sdate,
- grid.city_name as city_operator,
- grid.area_tower as area_operator,
- grid.tower_cost as tower_cost_total,
- grid.tower_num_avg as tower_num,
- grid.tower_cost_avg as tower_cost_avg_area,
- dg1.city_code*100 as city_code,
- dg2.area_code
- from sqmdb_cost.rpt_tower_cost_grid grid
- left join
- (select distinct city_code,city_sname from sqmdb_cost.dict_grid) dg1
- on grid.city_name=dg1.city_sname
- left join
- (select distinct city_sname,area_code,area_tower from sqmdb_cost.dict_grid) dg2
- on grid.city_name=dg2.city_sname and grid.area_tower=dg2.area_tower
- where smonth='202204'
- order by dg1.city_code,dg2.area_code
|