找回密码
 立即注册
搜索
查看: 165|回复: 0

[天际健康] 统计规则数量与新增和修改规则数量

[复制链接]
发表于 2025-2-6 13:37:31 | 显示全部楼层 |阅读模式
统计规则数量:
  1. select sum(c) from (
  2. select count(0)c from pdss.hospital_drug_dosage union all
  3. select count(0)c from pdss.hospital_indication union all
  4. select count(0)c from pdss.hospital_caution union all
  5. select count(0)c from pdss.hospital_interaction union all
  6. select count(0)c from pdss.hospital_drug_repeat union all
  7. select count(0)c from pdss.hospital_incompatibility_multi union all
  8. select count(0)c from pdss.hospital_contraindication union all
  9. select count(0)c from pdss.hospital_dosage_advanced union all


  10. select count(0)c from inppdss.hospital_drug_dosage union all
  11. select count(0)c from inppdss.hospital_indication union all
  12. select count(0)c from inppdss.hospital_caution union all
  13. select count(0)c from inppdss.hospital_interaction union all
  14. select count(0)c from inppdss.hospital_drug_repeat union all
  15. select count(0)c from inppdss.hospital_incompatibility_multi union all
  16. select count(0)c from inppdss.hospital_contraindication union all
  17. select count(0)c from inppdss.hospital_dosage_advanced);
复制代码
—统计修改和新增的规则数量:
  1. select sum(c),b from (
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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;
复制代码


欢迎注册吾爱缘分网,在这里可留言管理员需要找的资源哦。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|技术分享

GMT+8, 2025-3-12 19:04 , Processed in 0.462000 second(s), 19 queries .

Powered by 吾爱缘分

© 2024-2024 吾爱缘分

快速回复 返回顶部 返回列表