集团成本外部表数据源更新.sql 983 B

12345678910111213141516171819202122232425
  1. --集团成本外部表数据源更新
  2. --jt_chengben_202203_202204141616
  3. --jt_chengben_202204_202205060050
  4. --jt_chengben_202205_202206081941
  5. --jt_chengben_202206_202207070050
  6. --jt_chengben_202207_202208090650
  7. --alter foreign table sqmdb_cost.jituanchengben_e options(set filename '/data/esbftp/dopdata/nlptdata/jt_chengben_202207_202208090650');
  8. select distinct report_id,"period",period_type,smonth from sqmdb_cost.jituanchengben_e
  9. select distinct report_id,"period",smonth,count(*) from sqmdb_cost.report50010 group by report_id,"period",smonth
  10. select t.report_id,t.period,count(*)
  11. from sqmdb_cost.jituanchengben_e t
  12. where t.period like '2022-07%'
  13. group by t.report_id,t.period;
  14. select report_id,"period",period_type,entity_name_disp,column_tag,amount,smonth
  15. from sqmdb_cost.jituanchengben_e
  16. where entity_name_disp like '%石家庄%' and column_tag='COLUMN1' and report_id='50'
  17. and ds_cn='归集+横向分摊+调差' and lgl_type_name='01合并' and sch_name in ('北方省汇总展现','分省展现')