Query to get alert history

Query to get alert history, AskHareesh blog for Oracle Apps

Query to get alert history

SELECT
        ALV . *
FROM
        ALR_ALERTS AL ,
        ALR_ACTION_HISTORY AAH ,
        ALR_OUTPUT_HISTORY AOH ,
        ALR_ACTIONS_V ALV ,
        ALR_ALERT_HISTORY_VIEW AAHV
WHERE
        AL . ALERT_NAME =  ---------'XXPEP_PENDING_APPROVALS'
        AND AL . ALERT_ID = AAH . ALERT_ID
        AND AAH . CHECK_ID = AOH . CHECK_ID
        AND ALV . ALERT_ID = AAH . ALERT_ID
        AND AAHV . ALERT_NAME = AL . ALERT_NAME;

*/