Ciao, devi raggruppare i risultati per iddepartments

codice:
SELECT * FROM techassigns  WHERE staffid =  xxxxx GROUP BY iddepartments
Alessandro