1 Reply Latest reply on Dec 24, 2013 9:50 AM by spagnj

    Content that has not been viewed/accessed for over 1 year

    dishantgniit

      Hello All,

       

      I have prepared one query for my requirement(Content that has not been viewed/accessed for over 1 year):

       

      SELECT

      jivedw_activity_fact.activity_ts, jivedw_activity_fact.user_id, jivedw_activity_fact.activity_type, jivedw_object.dw_object_id, jivedw_object.object_type, jivedw_object.object_id, jivedw_object.name, jivedw_container.dw_container_id, jivedw_container.container_type, jivedw_container.container_id, jivedw_container.name, jivedw_user.username, jivedw_user.email, jivedw_user.firstname, jivedw_user.lastname

      FROM

      jivedw_activity_fact, jivedw_user, jivedw_object, jivedw_container

      WHERE jivedw_activity_fact.activity_type = 10 AND jivedw_activity_fact.user_id != -1 AND jivedw_activity_fact.user_id = jivedw_user.user_id AND jivedw_activity_fact.direct_dw_object_id = jivedw_object.dw_object_id  AND jivedw_activity_fact.dw_container_id= jivedw_container.dw_container_id

      AND jivedw_activity_fact.activity_ts  < current_date - interval '1 year'

       

      Can anyone please suggest above query is fine for my requirement?

       

      Best Regards

      Dishant