select
count(case when field1='A' then 1 end)数量1,
count(case when field2='B' then 1 end)数量2,
count(case when field3='C' then 1 end)数量3,
count(case when field4='D' then 1 end)数量4,
count(case when 1=1 then 1 end)总数4
from test;
Oracle多条件count
最新推荐文章于 2024-04-17 11:47:44 发布