You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

SQL Query Compare Timestamp By Hour

Received Response
21
Views
3
Comments

Hi experts,

I have Supplemental Table named Customer_Booking with two custom fields: RESERVATION_ID, EMAIL_ADDRESS and system fields CREATED_DATE_ and MODIFIED_DATE_.

The following is query to get all customer with booking that happens in last 2 days:

Select $A$.FIRST_NAME, $A$.LAST_NAME, $A$.EMAIL_ADDRESS_, $B$.RESERVATION_ID, $B$.CREATED_DATE_  FROM $A$, $B$ WHERE $A$.EMAIL_ADDRESS_ = $B$.EMAIL_ADDRESS AND $B$.CREATED_DATE_ >= SYSDATE - 2  AND $B$.CREATED_DATE_ <= SYSDATE

Now, we want to get all customer with booking that happens in last 2 hours. But I can not find the document to compare hourly. Can you please help?

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!