SELECT pkg.pkg_name, pv.pkg_version, pv.pv_id, cqi.iss_db, cqi.iss_id, cqi.iss_state, pv.comments AS reasons
  FROM CQ_ISSUES cqi,
       PACKAGE_DEPENDENCIES dep,
       PACKAGES pkg,
       PACKAGE_VERSIONS pv
 WHERE dep.pv_id = :PV_ID
   AND dep.dpv_id = cqi.pv_id(+)
   AND dep.dpv_id = pv.pv_id(+)
   AND pv.pkg_id = pkg.pkg_id
   AND cqi.iss_state (+) <> :enumISSUES_STATE_IMPORTED
 ORDER BY UPPER(pkg.pkg_name) ASC, cqi.iss_state DESC
