1234567891011121314151617 |
- --中间屏 分地市预算进度
- --chengben_center_city_202203.csv
- select
- cs.smonth,
- dg.city_sname as city_name,
- cs.cost_total as total_cost,
- ys.total_ys,
- cs.cost_total/ys.total_ys as rate_ys,
- dg.city_code*100 as city_code
- from
- (select smonth,sname,cost_total from sqmdb_cost.chengben_shengnei where stype='地市' and smonth='202204') cs
- join
- (select city_name||'_河北' as city_name,total_ys from sqmdb_cost.yusuan_shengnei) ys
- on cs.sname=ys.city_name
- join
- (select distinct city_code,city_pro,city_sname from sqmdb_cost.dict_grid) dg
- on cs.sname=dg.city_pro
|