April 4, 2019 at 2:53 pm
Hi,
I have a table which records a record each time a device connects, it has an Identity columnn LogSignOnID which is the PK and a NC Index on the AuditUTCDateTime column -
LogSignOnIDDeviceIDAuditUTCDateTime
11963359320732019-04-02 20:00:16.353
11963358231602019-04-02 20:00:15.727
11963357282252019-04-02 20:00:15.727
11963356313582019-04-02 20:00:15.727
11963355203472019-04-02 20:00:15.727
1196335418512019-04-02 20:00:13.240
11963353423072019-04-02 20:00:12.910
11963352131622019-04-02 20:00:12.490
11963351242102019-04-02 20:00:12.090
11963350384812019-04-02 20:00:10.993
What is needed is report on devices and the time differnce bewteen each Sign on record.
As there are millons of rows we would filter this between start / end dates and we would be looking at records that are gretaer than 5 minutes apart.
Thanks in advance for help received.
April 4, 2019 at 4:08 pm
Use LAG()
or LEAD()
.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply