SELECT DISTINCT prj.proj_name, rt.rtag_name, vw.view_name, pv.pv_id,
                pkg.pkg_name, pv.pkg_version, pv.modified_stamp,
                act.description, pv.comments
           FROM package_versions pv,
                PACKAGES pkg,
                release_content rc,
                views vw,
                release_tags rt,
                projects prj,
                action_log act
          WHERE pv.modified_stamp >= TO_DATE (:from_date, 'DD/MM/YYYY')
            AND pv.modified_stamp <= TO_DATE (:TO_DATE, 'DD/MM/YYYY') + 1
            AND pv.dlocked = 'Y'
            AND pv.comments <> 'Rippled Build.'
            AND pkg.pkg_id = pv.pkg_id
            AND rc.pv_id(+) = pv.pv_id
            AND rt.rtag_id(+) = rc.rtag_id
            AND prj.proj_id(+) = rt.proj_id
            AND vw.view_id(+) = rc.base_view_id
            AND act.pv_id = pv.pv_id
            AND act.acttype_id = 6
       ORDER BY act.description, pkg.pkg_name, pv.pkg_version, rt.rtag_name