prova cosi
codice:
SELECT branch.id, branch.name FROM branch INNER JOIN items ON branch.id = items.cat GROUP BY branch.id