Date Visitorid Visitnumber Condition A
1/1/2017 123 2 OF
1/1/2017 123 3 OF
1/1/2017 123 30 ABC
1/2/2017 123 34 OP
1/1/2017 124 1 OF
1/2/2017 124 2 OP
我希望minus visitorId
访问过的访问号码' OF'首先访问了OP' (但它应该在不同的日期)并且还想将上述结果分组为
Count of visitor_ids where minus (of visit number is 1)
Count of visitor_ids where minus (of visit number is 2)
等等