when I ty to run this query
@Query(value = "select TOP(10) noleggi.id_libro, count(*) as occ from noleggi " +
"group by noleggi.id_libro " +
"order by occ desc",
nativeQuery=true)
List<Noleggio> findTop10();
Hibernate shows this error :
select TOP(10) noleggi.id_libro, count(*) as occ from noleggi group by noleggi.id_libro order by occ desc 2020-01-12 15:07:08.444 WARN 12316 --- [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: S1093 2020-01-12 15:07:08.444 ERROR 12316 --- [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : invalid column name id.
I don't use id, what do it means that?