select pmi_formation_id, for_name from pmi_formation where pmi_formation_id in (select pmi_formation_id from pmi_formation) and pmi_formation_id in (select pmi_formation_id FROM pmi_formation, node, pmi_metier_formation where mf_formation_id = pmi_formation_id and mf_metier_id = node.nid and node.status = 1 and node.type = 'metier' ) order by for_name