Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

extract min and max records from a table

User_SPVYVFeb 19 2021

Hi:
I need to generate output as below from my input table. I need to capture latest and immediate previous device info by subs_key. For latest device identification condition is - pick the records with with Max date and EVENT = 'RECON' by each subs_key and for previous device any event for the same subs_key but the event should occur on the same day or within 30 days from latest transaction.
For example, subs_key 90011 - latest transaction happened on 16th Oct and with Event Recon it's latest IMEI is 352505, then we need to checked the most closest transaction to identify previous device and the lookback period is 30 days form latest transaction.
I've developed a query but it's not showing correct output. Can anyone help please?
Input table:
image.pngOutput:
image.pngthanks!

Comments

Newbie_820-Oracle

And here: https://docs.oracle.com/database/121/AEAPI/apex_mail.htm#AEAPI341
Just not sure how to trigger it from a calendar's due date.

Jeroen.

I'm using Automations to 'trigger' emails. Works great!
Automate your business process in Oracle APEX 20.2 | Oracle Application Express Blog
Regards,
Jeroen

1 - 3

Post Details

Added on Feb 19 2021
0 comments
49 views