assuming i have the following rows :
'employee' , 'is_here' , 'ts'
1 , 1 , 22
2 , 1 , 33
1 , 0 , 44
1 , 0 , 55
2 , 0 , 66
1 , 0 , 77
2 , 0 , 88
1 , 1 , 99
is there any way to display the results of some employee when then is_here changes ?
for example i want to get the rows where employee #1 is_here changed , so the output will be :
1,1,22
1,0,44
1,1,99
That would be challenging i guess 🙂
As long as you run the query for only one employee at the time
http://sqlfiddle.com/#!2/a71d8/11