Hello All,
I am looking for some help !
I have the below table - sample screen shot with data attached.
columns
id
ref
times
type
status
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
Any idea's
Thanks in advance
I am looking for some help !
I have the below table - sample screen shot with data attached.
columns
id
ref
times
type
status
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
Any idea's
Thanks in advance