[JPA] 여러 개 컬럼 Sum을 조회하는 방법은 없다
목적 JPA 에서 한 쿼리로 여러 개 컬럼 Sum 값을 불러오기 위함. 1 2 3 4 5 6 // 날짜/시간별 통계 데이터 @Query(value = " SELECT SUM(req_cnt) AS req_cnt, SUM(res_cnt) AS res_cnt, SUM(ctr_cnt) AS ctr_cnt"+ " FROM AdStatistics " + " WHERE coldate = :col_date") Optional sumAdStatisticsByColdate(@Param("col_date") String col_date); cs 쿼리를 위와 같이 사용했으나 안되었다. https://stackoverflow.com/questions/3449719/how-to-run-an-aggregate-function-li..