U kunt aggregatie gebruiken: select up, max(code_dept) as code_dept from ESP_ENSEIGNANT ee group by up;