Informix SQL, Query - time difference between previous record

Ukończone Opublikowano 5 lat temu Płatność przy odbiorze
Ukończone Płatność przy odbiorze

The attached query is in Informix format.

I would like to build on this query. I would like a extra column called 'difference' that does the following - if the user is the same as the previous record it will time-time from previous record. if not then null.

I would then like another column called gap. If the 'difference' is greater than 5 minutes then 1 else 0

Administrowanie bazami danych Microsoft SQL Serwer MySQL Oracle SQL

Numer ID Projektu: #17080081

O projekcie

12 ofert Zdalny projekt Aktywny 5 lat temu

Przyznany użytkownikowi:

kurbsky

I suppose you're using Informix 12.1 of higher version. I think something like this would be useful: SELECT idc_userid as User, event_ts as time, after_event_qty as Qty, event_loc1_text as Location, to_c Więcej

£10 GBP w 1 dzień
(5 ocen)
1.6

12 freelancerów złożyło ofertę za £19 w tym projekcie

softcarve

Hi, I would like to write the query to get the time difference and gap from previous row. Available to start now. please get in touch to discuss more. Regards, Manish

£20 GBP w ciągu 1 dnia
(103 Oceny)
5.9
alyelhaddad

Hi there, I'm Aly I've seen your post and I'm interested. I've had much experience with Microsoft SQL Server, including building dynamic and relatively complex queries. Requirements seems clear. In fact, I've already Więcej

£25 GBP w ciągu 0 dni
(15 Oceny)
4.8
sreenivas2903

Hi i could able to finish this please let me know do we take exactly previous record

£21 GBP w ciągu 3 dni
(22 Oceny)
4.6
engdinamallam

Hello, I am interested in your project, I am a Senior .net Software Engineer with 6+ years of working experience in Software applications full life cycle. i have already done sql queries for you that add two new colum Więcej

£20 GBP w ciągu 1 dnia
(3 Oceny)
4.1
technosoft1vw

Dear Prospect Hiring Manager. Thank you for giving me a chance to bid on your project. i am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I have Więcej

£18 GBP w ciągu 1 dnia
(0 Oceny)
0.0
snehaaddala

I have worked on PL SQL for 5 years. Relevant Skills and Experience PL SQL, postgres, ETL, Unix, excel

£13 GBP w ciągu 1 dnia
(0 Oceny)
0.0