SELECT T1.Datum as Od,(SELECT Min(T2.Datum) FROM Ocitanja T2 WHERE T2.Datum>T1.datum) as Do,T1.stanje FROM Ocitanja as T1;