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!

How to get data for last 30, 60 and 90 days

kolipakaFeb 25 2014 — edited Feb 25 2014

Hi Guys,

I need one help to write a query. how to get data for 30,60 and 90 days using below query. I want to get all (for 30,60,90 days) with one query, and based on that I need to insert or update data in another table.

SELECT act_app.actor_id actor_id

    FROM actor_app_assn act_app,

      hr_empl hr_emp,

      actor act

    WHERE act.emp_id = hr_emp.emplid

    AND hr_emp.empl_status = 'A' --active

    AND act_app.actor_id  = act.actor_id  

    AND appl_id = 123 --''US Users'

  MINUS

  SELECT users_id actor_id,

  FROM t_user_audit

  WHERE create_date > sysdate - 30;

Thanks in advance!

Rgrds,

KL

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2014
Added on Feb 25 2014
3 comments
27,986 views