Calculate log time differences without a unique id in oracle