报表_4_超高租费.sql 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. select distinct
  2. city_sname as city_name, --地市分公司
  3. station_sname as jz_name,--局站名称
  4. area_name as county_name, --区县名称
  5. station_sid as zy_jz_id, --局站ID
  6. station_type as zy_jz_type,--局站类型
  7. station_level as zy_cj,--所属场景
  8. property_type as zy_qs_type,--权属类别
  9. tower_cost as tt_zj, --铁塔租金
  10. changd_cost as tt_qz_cz, --其中:场租
  11. zhejiu_cost as tt_qz_zj, --其中:折旧
  12. service_property as tt_ywsx,--业务属性
  13. production_type as tt_cplx, --产品类型
  14. site_addr_id as tt_zz_code, --铁塔站址编码
  15. tower_cbzx as tt_cb, --成本中心
  16. changd_cost_grid as wg_wg_j, --场租(网格)
  17. over_changd_cost_grid as wg_czbs,--场租倍数(网格)
  18. tower_cost_grid as wg_wg_zlf, --租赁费 本网格
  19. over_tower_cost_grid as wg_zlfbs,--租赁费倍数(网格)
  20. changd_cost_city as ds_bdw, --场租(地市)
  21. over_changd_cost_city as ds_czbs,--场租倍数(地市)
  22. tower_cost_city as ds_bdw_zlf, --租赁费 本地市
  23. over_tower_cost_city as ds_zlfbs,--租赁费倍数(地市)
  24. changd_cost_grid_scene_good as tt_cz_cj_wg_y,--场租:本场景本网格最优
  25. changd_cost_grid_scene_avg as tt_cz_cj_wg_j, --场租:本场景本网格均值
  26. changd_cost_grid_scene_bs as tt_cz_czbs, --场租:场租倍数
  27. changd_cost_city_scene_good as tt_cz_cj_ds_wg_y,--场租:本场景本地市网格内最优
  28. changd_cost_city_scene_avg as tt_cz_cj_ds_wg_j, --场租:本场景本地市网格内均值
  29. tower_cost_grid_scene_good as tt_zlf_cj_wg_y, --铁塔租赁费:本场景本网格最优
  30. tower_cost_grid_scene_avg as tt_zlf_cj_wg_j, --铁塔租赁费:本场景本网格均值
  31. tower_cost_grid_scene_bs as tt_zlf_zlfbs, --铁塔租赁费:租赁费倍数
  32. tower_cost_city_scene_good as tt_zlf_cj_ds_wg_y, --铁塔租赁费:本场景本地市网格内最优
  33. tower_cost_city_scene_avg as tt_zlf_cj_ds_wg_j, --铁塔租赁费:本场景本地市网格内均值
  34. cost_hetong as ht_zj, --合同租金
  35. hetong_sid as ht_code, --合同编号
  36. hetong_cbzx as ht_cb, --合同成本中心
  37. ht_cost_grid_scene_good as thr_wg_y_new, --本场景本网格最优
  38. ht_cost_city_scene_good as thr_ds_y_new, --本场景本地市网格内最优
  39. ht_cost_grid_scene_avg as thr_ds_j_new, --本场景本地市网格内均值
  40. ht_cost_grid_scene_bs as thr_zjbs, --租金倍数
  41. ht_cost_cbzx_good as thr_dw_y_new, --本场景本单位最优
  42. city_code as city_id,
  43. smonth as month_id,
  44. grid_code as county_id,
  45. sort_id_city,
  46. station_level_id
  47. from sqmdb_cost.rpt_baobiao_4_cgzf
  48. where smonth='202205'
  49. order by sort_id_city,station_level_id,service_property,production_type,changd_cost desc