• qamar 52306 (1/1/2013)


    Hello

    I want to select records such that if a user logs in again within 10 minutes it should ignore it, and only return the rows if the same user login after 10 or more minutes.

    UserID LOGTIME

    U1 25-12-2011 14:20:00

    U1 25-12-2011 14:28:00 --ignore it

    U1 25-12-2011 14:40:00

    U1 25-12-2011 14:48:00 --ignore

    note: datetime is in standard format, above values for example only

    Really could use a little more in the sample data and expected results area. Given the following, what would you expect?

    UserID LogTime

    U1 20111225 14:20:00

    U1 20111225 14:28:00

    U1 20111225 14:30:00

    U1 20111225 14:31:00

    U1 20111225 14:40:00

    U1 20111225 14:48:00

    U1 20111225 14:51:00

    U2 20111225 14:20:00

    U2 20111225 14:28:00

    U2 20111225 14:33:00

    U2 20111225 14:43:00

    U2 20111225 14:53:00

    U2 20111225 14:58:00

    U2 20111225 15:09:00