Hey Guys! sorry for my english but I hope you understand and could help me. I want to get the following information: The time betweeen the timestamps "e" in seconds from one object with an unique "ipid". Please see my attachement. I tried with DATADIFF and LAG: SELECT DATEDIFF (second, ptime, e), q.* FROM (SELECT *, LAG(e) OVER (PARTITION BY ipid ORDER BY e) ptime FROM Table ) q WHERE ptime IS NOT NULL But: "The LAG function is not supported in PROC SQL, it is only valid within the DATA step." You have any other idea? Thanks!!!
... View more