Answers for "How to take sum of column with same id in "JPQL?""

SQL
0

How to take sum of column with same id in "JPQL?"

public interface CodeRepository extends JpaRepository<Code, Integer> {
    @Query("select c.code, c.name, count(l) as amount from Code c join c.counterList l group by c.code, c.name")
    List<Object[]> getSummary();
}
Posted by: Guest on September-02-2021

Code answers related to "How to take sum of column with same id in "JPQL?""

Code answers related to "SQL"

Browse Popular Code Answers by Language