sql - I need to calculate the difference from the TIME STAMP of each row for each unique DEFECT ID -
example: there new column named “time stamp delta”. 3rd defect id of 1013 have value in field it’s time stamp value minus value of time stamp in record precedes in time same defect id. value in "time stamp delta" column first defect of 1013 zero.
defect_id detected closed time stamp 1013 1/2/13 12:00 1/15/13 12:00 1/2/13 2:20 pm 1013 1/2/13 12:00 1/15/13 12:00 1/14/13 3:47 pm 1013 1/2/13 12:00 1/15/13 12:00 1/15/13 3:30 pm 1014 1/3/13 12:00 1/10/13 12:00 1/3/13 9:06 1014 1/3/13 12:00 1/10/13 12:00 1/10/13 10:55 1014 1/3/13 12:00 1/10/13 12:00 1/10/13 3:31 pm 1015 1/8/13 12:00 1/8/13 12:00 1/8/13 10:46 1016 1/11/13 12:00 1/15/13 12:00 1/11/13 10:18 1016 1/11/13 12:00 1/15/13 12:00 1/15/13 3:28 pm 1017 1/16/13 12:00 1/17/13 12:00 1/17/13 11:11 1018 1/18/13 12:00 1/29/13 12:00 1/18/13 9:05 1018 1/18/13 12:00 1/29/13 12:00 1/24/13 1:28 pm 1018 1/18/13 12:00 1/29/13 12:00 1/31/13 10:26
Comments
Post a Comment