SELECT
COUNT(D.ID) AS TOTAL,
COUNT(CASE
WHEN D.DIABETES = '1' THEN
'DIABETES'
END) DIABETES_COUNT, -- 糖尿病
COUNT(CASE
WHEN D.HYPERTENSION = '1' THEN
'HYPERTENSION'
END) HYPERTENSIONCOUNT, -- 高血压病
COUNT(CASE
WHEN D.STROKE_FAMILY_HIS = '1' THEN
'STROKE_FAMILY_HIS'
END) STROKE_FAMILY_HISCOUNT -- 脑卒中家族史
FROM DHS_CARDIOVASCULAR_SCREENING D