Here is what I am looking for:
create table test.test(
col1 boolean,
act_date date)
Sample query:
select
col1,
act_date,
row_number() over (partition by col1 order by act_date) rnum,
rank() over (partition by col1 order by act_date) rrnum,
dense_rank() over (partition by col1 order by act_date) drrnum
from test.test
order by act_date
col1 act_date rnum dnum drnum whatIwant
t 2018-08-12 1 1 1 1
f 2018-08-13 1 1 1 1
f 2018-08-14 2 2 2 2
t 2018-08-15 2 2 2 1
t 2018-08-16 3 3 3 2
t 2018-08-17 4 4 4 3
f 2018-08-18 3 3 3 1
f 2018-08-19 4 4 4 2
t 2018-08-20 5 5 5 1
t 2018-08-21 6 6 6 2
t 2018-08-22 7 7 7 3
f 2018-08-23 5 5 5 1
f 2018-08-24 6 6 6 2
f 2018-08-25 7 7 7 3
t 2018-08-26 8 8 8 1
t 2018-08-27 9 9 9 2
f 2018-08-28 8 8 8 1
t 2018-08-29 10 10 10 1
t 2018-08-30 11 11 11 2
t 2018-08-31 12 12 12 3
FWIW, my ultimate goal is to isolate the rows for which three or more consecutive rows are false. I would choose from the output where whatIwant >= 3. If there is a different way of accomplishing this task without using analytic functions I'm all ears.
FWIW, my data is in google bigquery.