Skip to Main Content

SQL & PL/SQL

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!

please explain this one

952526Sep 10 2012 — edited Sep 11 2012
Hi, I relaly have trouble with the "date"

can anyone explains what the following is doing? Thanks


select trunc( DATE '1970-01-01' + timestamp / (1000 * 60 * 60 * 24) - 7/24) report_date,
count(*) route_request

from system_usage_load_api

where DATE '1970-01-01' + timestamp / (1000 * 60 * 60 * 24) >= '25-May-12'
and DATE '1970-01-01' + timestamp / (1000 * 60 * 60 * 24) < trunc(sysdate)
group by trunc( DATE '1970-01-01' + timestamp / (1000 * 60 * 60 * 24) - 7/24)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2012
Added on Sep 10 2012
10 comments
786 views