|
统计规则数量:
- select sum(c) from (
- select count(0)c from pdss.hospital_drug_dosage union all
- select count(0)c from pdss.hospital_indication union all
- select count(0)c from pdss.hospital_caution union all
- select count(0)c from pdss.hospital_interaction union all
- select count(0)c from pdss.hospital_drug_repeat union all
- select count(0)c from pdss.hospital_incompatibility_multi union all
- select count(0)c from pdss.hospital_contraindication union all
- select count(0)c from pdss.hospital_dosage_advanced union all
- select count(0)c from inppdss.hospital_drug_dosage union all
- select count(0)c from inppdss.hospital_indication union all
- select count(0)c from inppdss.hospital_caution union all
- select count(0)c from inppdss.hospital_interaction union all
- select count(0)c from inppdss.hospital_drug_repeat union all
- select count(0)c from inppdss.hospital_incompatibility_multi union all
- select count(0)c from inppdss.hospital_contraindication union all
- select count(0)c from inppdss.hospital_dosage_advanced);
复制代码 —统计修改和新增的规则数量:
- select sum(c),b from (
- select count(0)c,substr(t.modify_time,0,7)b from pdss.hospital_drug_dosage_history t group by substr(t.modify_time,0,7) union all
- select count(0)c,substr(t.modify_time,0,7)b from pdss.hospital_drug_repeat_history t group by substr(t.modify_time,0,7) union all
- select count(0)c,substr(t.modify_time,0,7)b from pdss.hospital_indication_history t group by substr(t.modify_time,0,7) union all
- select count(0)c,substr(t.modify_time,0,7)b from pdss.hospital_caution_history t group by substr(t.modify_time,0,7) union all
- select count(0)c,substr(t.modify_time,0,7)b from pdss.hospital_interaction_history t group by substr(t.modify_time,0,7) union all
- select count(0)c,substr(t.modify_time,0,7)b from pdss.HOSPITAL_INCOMPATIMULTI_HIS t group by substr(t.modify_time,0,7) union all
- select count(0)c,substr(t.modify_time,0,7)b from pdss.hospital_dosage_advanced_his t group by substr(t.modify_time,0,7) union all
- select count(0)c,substr(t.create_time,0,7)b from pdss.hospital_drug_dosage t group by substr(t.create_time,0,7) union all
- select count(0)c,substr(t.create_time,0,7)b from pdss.hospital_drug_repeat t group by substr(t.create_time,0,7) union all
- select count(0)c,substr(t.create_time,0,7)b from pdss.hospital_indication t group by substr(t.create_time,0,7) union all
- select count(0)c,substr(t.create_time,0,7)b from pdss.hospital_caution t group by substr(t.create_time,0,7) union all
- select count(0)c,substr(t.create_time,0,7)b from pdss.hospital_interaction t group by substr(t.create_time,0,7) union all
- select count(0)c,substr(t.create_time,0,7)b from pdss.hospital_dosage_advanced t group by substr(t.create_time,0,7)) where b>'2022-10' and b<'2023-11' group by b;
复制代码
|
|