I have the below table - sample screen shot with data attached.
I need to run a query - that checks the last 3 consecutive times by distinct type
so for example order by timestamp asc... if the last 3 records for type 326 = Y and the current value = N then change the current value to Y to match the last 3 records. I need to do this for all records. So it needs to check by time and type
I can not understand your question
What do you mean "checks the last 3 consecutive times by distinct type"
and what is the "current value"
Maybe giving some example data and expect result will make the question more clear.