📜  spring jpa group by 查询方法 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:06.335000             🧑  作者: Mango

代码示例1
@Query("SELECT c.year, COUNT(c.year) FROM Comment AS c GROUP BY c.year ORDER BY c.year DESC")
    List countTotalCommentsByYear();