我想要每个和每天的总行数想要连续的最大行计数,其中条件麻木> 2和校准!= 1来自下面的图表
manually implementing Send
is unsafe already
和欲望输出应
答案 0 :(得分:2)
我认为你想要条件聚合:
select todaydate, count(*) as totalrow,
sum(case when (numb > 2 and calibration <> 1) then 1 else 0 end) as [max]
from table t
group by todaydate;