I am using Spring to connect to the db. I have an interface extending CrudRepository Here is the query I want execute on the db: SELEC
CrudRepository
SELEC
Have you tried rewording your query like this?
@Query("SELECT DISTINCT p.name FROM People p WHERE p.name NOT IN ?1") List findNonReferencedNames(List names);
Note, I'm assuming your entity class is named People, and not people.
People
people