SELECT ROUND(AVG(l.DET_ITEM_FEE_SUMAMT),2) norm, MAX(l.DET_ITEM_FEE_SUMAMT) big, MIN(l.DET_ITEM_FEE_SUMAMT) small FROM fee_list_d l, per_path_info p WHERE l.MDTRT_ID = p.mdtrt_id AND DATE_FORMAT(l.FEE_OCUR_TIME,'%Y-%m') >= "2023-07" AND DATE_FORMAT(l.FEE_OCUR_TIME,'%Y-%m') <= "2023-07" AND p.hospcode = "H41162501992" AND l.DISE_CODG = "xhnk08" AND p.adm_dept_code = "01" AND p.adm_doc_code = "1"
时间: 2024-04-22 15:25:06 浏览: 149
rastafilt.rar_Background Noise_DET_rasta_背景噪声
根据您的查询条件,您想要从fee_list_d表和per_path_info表中获取以下结果:在2023年7月份,医院编码为"H41162501992",诊断编码为"xhnk08",入院科室编码为"01",入院医生编码为"1"的数据中,计算费用项DET_ITEM_FEE_SUMAMT的平均值(保留两位小数),最大值和最小值。
以下是您的查询语句:
SELECT ROUND(AVG(l.DET_ITEM_FEE_SUMAMT),2) AS norm,
MAX(l.DET_ITEM_FEE_SUMAMT) AS big,
MIN(l.DET_ITEM_FEE_SUMAMT) AS small
FROM fee_list_d l, per_path_info p
WHERE l.MDTRT_ID = p.mdtrt_id
AND DATE_FORMAT(l.FEE_OCUR_TIME,'%Y-%m') >= "2023-07"
AND DATE_FORMAT(l.FEE_OCUR_TIME,'%Y-%m') <= "2023-07"
AND p.hospcode = "H41162501992"
AND l.DISE_CODG = "xhnk08"
AND p.adm_dept_code = "01"
AND p.adm_doc_code = "1"
阅读全文