Count max consecutive values

Hello, I try to get values with specific logic.

For Example, we get 2 Entity from 4 days period.

Name Date Val
B 01 1 (1)
A 01 1
A 02 0
A 03 1
A 04 1 (2)

In response, I want to count max_consecutive days for Name where val=1.
Not interrupted by 0

So B=1, A=2

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.