我正在尝试显示来自 AnnualBudget 的最小值,这是我到目前为止所做的代码:
SELECT WARD.HospitalCode,
HOSPITAL.HospitalCode Name,
WardNo,
AnnualBudget
FROM WARD,
HOSPITAL
WHERE (AnnualBudget) =
(SELECT AnnualBudget
FROM WARD
WHERE AnnualBudget =
(SELECT MIN(AnnualBudget)
FROM WARD
WHERE AnnualBudget >
(SELECT MIN(AnnualBudget)
FROM WARD
)
)
);
但是,它实际上选择了最大值,而不是选择最小值,有人可以帮忙吗?