SELECT pv.pv_id AS dpv_id, pkg.pkg_name, pv.pkg_version
  FROM PACKAGES pkg, package_versions pv, package_dependencies dep
 WHERE pv.pkg_id = pkg.pkg_id
   AND dep.dpv_id = pv.pv_id
   AND dep.pv_id = :PV_ID
ORDER BY UPPER(pkg.pkg_name) 