SELECT distinct b.bom_id,
br.branch_name, bn.bom_name, b.BOM_VERSION ||'.'|| b.BOM_LIFECYCLE AS VERSION
FROM package_versions pv, packages pkg, deployment_manager.os_contents osc, 
deployment_manager.operating_systems os,
deployment_manager.network_nodes nn, deployment_manager.bom_contents bc,
deployment_manager.boms b, deployment_manager.bom_names bn, 
deployment_manager.branches br, deployment_manager.dm_projects proj
WHERE pv.pkg_id = pkg.pkg_id
AND osc.prod_id = pv.pv_id
AND os.os_id = osc.os_id
AND nn.node_id = os.node_id 
AND bc.node_id = nn.node_id
AND b.bom_id = bc.bom_id
AND bn.bom_name_id = b.bom_name_id
AND br.branch_id = b.branch_id
AND proj.proj_id = br.proj_id
AND br.is_hidden IS NULL
AND pv.pv_id = :PV_ID
ORDER BY b.bom_id 