I didnt know how to title this thread...
I have a table with name,a number and a date.
I need to get the date in wich, that number changed from zero from end to start.

For example:
I have
name 1, 8, date1
name 1, 0, date2
name 1, 3, date3
name 1, 8, date4
name 1, 0, date5
name 1, 0, date6

from the last date to start the last day with "0" is date5, so I need to get that value or date4 and then I add 1 day.

Any idea of how can I do this?
Thanks