how to take sum of column with same id in 22jpql 3f 22

Solutions on MaxInterview for how to take sum of column with same id in 22jpql 3f 22 by the best coders in the world

showing results for - "how to take sum of column with same id in 22jpql 3f 22"
Ashley
25 Apr 2019
1public interface CodeRepository extends JpaRepository<Code, Integer> {
2    @Query("select c.code, c.name, count(l) as amount from Code c join c.counterList l group by c.code, c.name")
3    List<Object[]> getSummary();
4}
5
similar questions