I'm working with redash and I need to get user rows where for each row delta between date field is less than hour.
In more details: I need a session, user activity where it has some actions where end of the session defined by last action + 1 hour.
users row is <id, action, date>
user_id page happened_at
179,233 rooms.view.step.content 2017-03-01 09:24
179,233 rooms.view.step.content 2017-03-01 09:01
179,233 rooms.student-showcase 2017-03-01 12:02
datediff
should help there, but it is not available at redash - redshift
.
I'm looking for alternatives. Anyone has thoughts there?
Please try this. You may even choose dateadd instead.
By the way, redshift has datediff. Not sure why is it not supported in redash.