Vishnu Bhangale

Vishnu Bhangale

  • NA
  • 264
  • 46k

In sql substract next value from previous value and check

Feb 25 2018 10:17 PM
i have data in Log column
Log 
8:50
8:50
9:50
10:00
10:00
10:00
13:00
15:00
when i substract next value from previous value and the difference is greater than 5 min then skip the next value and first value store kip as it is in column
ex suppose we substract 10:00 fom 9:50 and diff is greater than 5 min skip the 10:00 and store 9:50

Answers (6)