I have a project using Spring Data JPA that consumes data from a table full of addresses. One of the columns of this table is the city. I would like to get a distinct list of cities that are in the table i.e.
SELECT DISTINCT city FROM address.
Is there a way to do this using Spring Data JPA?