SQL to get 3 adjacent actions without duplicate from the flags

I have a question that a little bit similar with question#66044663 but more complicated. Here’s my dummy data. I want to get 3 adjacent actions(no duplicate) from the flag by each user. Here’s the …

SQL SUM OVER PARTITION BY 2 columns not working

Common question, I know. Just haven’t been able to find a solution to my question, so hit me with the removal and or downvotes if you must. (Oracle 12c) I have data that looks like this: Date …