SQL Query Compare Timestamp By Hour
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?
0