SELECT pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, cqi.*
  FROM cq_issues cqi,
       packages pkg,
       package_versions pv
 WHERE pv.pkg_id = pkg.pkg_id
   AND cqi.pv_id = pv.pv_id
   AND cqi.iss_db = /*ISS_DB*/
   AND cqi.iss_id IN ( /*ISS_ID_LIST*/ )  
ORDER BY cqi.iss_id, UPPER(pkg.pkg_name)    
   
   