select tt.school,
count(tt.id) astoBeScreenCount,
count(tt.screen_tag = '1' or null) as screenedCount,
count(tt.symptom_tag = '1' or null) as symptomCount,
count(tt.tst_exam_tag = '1' or null) as tstExamCount,
count(tt.tst_strong_positive_tag = '1' or null) as tstStrongPositiveCount,
count(tt.igra_exam_tag = '1' or null) as igraExamCount,
count(tt.igra_strong_positive_tag = '1' or null) as igraStrongPositiveCount,
count(tt.id) as chestExamCount,
count(tt.chest_exam_tag = '1' or null) as chestExamRealCount,
count(tt.diagnosis_tag = '1' or null) as diagnoseTbCount,
count(tt.infect_tag = '1' or null) as tbInfectCount,
count(tt.tb_receive_treatment_tag = '1' or null) as tbInfectTreatedCount,
count(tt.complete_treat_tag = '1' or null) as completeTbTreatCount,
CASE
WHEN age > 15 THEN
1
ELSE
2
END as agegroup
from t_tb tt
where tt.people_type = '0'
GROUP BY CASE
WHEN age > 15 THEN
1
ELSE
2
END,school ORDER BY school;
测试 哈哈哈 我好像会使用了哦
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。