View HLPDTEST.STATEGPS.RECENTLY_ACCESSED_WF_V | Generated by SchemaSpy |
View Definition:
SELECT t_gps_dbv_users.user_name,
t_gps_favourites_history.application_id AS app_id,
t_gps_applications.application_name AS application,
t_gps_workflow_types.workflow_type_id AS wf_id,
t_gps_workflow_types.workflow_type_name AS wf_sys_name,
COALESCE(t_gps_workflow_types.display_name, t_gps_favourites_history.object_name) AS object_name,
max(t_gps_favourites_history.accessed_time) AS max
FROM t_gps_favourites_history t_gps_favourites_history,
t_gps_workflow_types t_gps_workflow_types,
t_gps_dbv_users t_gps_dbv_users,
t_gps_applications t_gps_applications
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 = 'WORKFLOW'
AND t_gps_favourites_history.application_id = t_gps_workflow_types.application_id
AND t_gps_favourites_history.object_name = t_gps_workflow_types.workflow_type_name
AND t_gps_applications.VISIBLE_FLAG = 'true'
AND t_gps_workflow_types.VISIBLE_FLAG = 'true'
AND t_gps_workflow_types.DISPLAYON_PORTAL = 'true'
GROUP BY t_gps_dbv_users.user_name,
t_gps_favourites_history.application_id,
t_gps_applications.application_name,
t_gps_workflow_types.workflow_type_id,
t_gps_workflow_types.workflow_type_name,
COALESCE(t_gps_workflow_types.display_name, t_gps_favourites_history.object_name)
ORDER BY (max(t_gps_favourites_history.accessed_time)) DESC
Possibly Referenced Tables/Views: