SELECT * from tabella
where ...tua condizione
GROUP BY nome