View HLPDTEST.STATEGPS.RECENTLY_ACCESSED_EWKS_V | Generated by SchemaSpy |
View Definition:
SELECT
t_gps_applications.APPLICATION_NAME AS APPLICATION,
T_GPS_VIEWER_INSTANCES_SET.SET_NAME AS FOLDER,
T_GPS_VIEWER_INSTANCES.FORM_NAME AS EWKS_SYS_NAME,
T_GPS_VIEWER_INSTANCES.VIEWER_INSTANCES_ID AS EWKS_ID,
t_gps_dbv_users.user_name,
T_GPS_VIEWER_INSTANCES.post_instance_name,
COALESCE(T_GPS_VIEWER_INSTANCES.DISPLAY_NAME,T_GPS_VIEWER_INSTANCES.FORM_NAME) AS DISPLAY_NAME,
max(t_gps_favourites_history.accessed_time) AS max
FROM t_gps_favourites_history t_gps_favourites_history,
t_gps_dbv_users t_gps_dbv_users,
t_gps_applications t_gps_applications,
STATEGPS.T_GPS_VIEWER_INSTANCES_SET T_GPS_VIEWER_INSTANCES_SET, STATEGPS.T_GPS_VIEWER_INSTANCES T_GPS_VIEWER_INSTANCES
WHERE t_gps_dbv_users.dbv_user_id = t_gps_favourites_history.dbv_user_id AND
t_gps_favourites_history.application_id = t_gps_applications.application_id
AND trunc(t_gps_favourites_history.accessed_time) >= (CURRENT_DATE - 365)
AND t_gps_favourites_history.object_type = 'VIEWER SET / REPORT'
and t_gps_applications.application_id = T_GPS_VIEWER_INSTANCES_SET.application_id
and T_GPS_VIEWER_INSTANCES_SET.SET_ID = T_GPS_VIEWER_INSTANCES.SET_ID
AND t_gps_favourites_history.object_name = T_GPS_VIEWER_INSTANCES_SET.SET_NAME || ' / ' || T_GPS_VIEWER_INSTANCES.FORM_NAME
AND T_GPS_VIEWER_INSTANCES.VISIBLE_FLAG = 'true'
AND T_GPS_VIEWER_INSTANCES_SET.VISIBLE_FLAG = 'true'
AND t_gps_applications.VISIBLE_FLAG = 'true'
GROUP BY t_gps_applications.APPLICATION_NAME,
T_GPS_VIEWER_INSTANCES_SET.SET_NAME,
T_GPS_VIEWER_INSTANCES.FORM_NAME,
T_GPS_VIEWER_INSTANCES.VIEWER_INSTANCES_ID, t_gps_dbv_users.user_name,T_GPS_VIEWER_INSTANCES.post_instance_name,T_GPS_VIEWER_INSTANCES.DISPLAY_NAME,T_GPS_VIEWER_INSTANCES.FORM_NAME
ORDER BY (max(t_gps_favourites_history.accessed_time)) DESC
Possibly Referenced Tables/Views: