public class Data { private Long id ; private Long courseId ; private String content ; public Long getId() { return id; } public Data setId(Long id) { this.id = id; return this ; } public Long getCourseId() { return courseId; } public Data setCourseI…
说明:group by是sql中对数据表中的数据进行分组的,在select列表中出现的字段必须全部出现在group by 字段中,出现在聚合函数中的字段在group by中可有可无,没有出现在select列表中的字段在group by中也可以使用.在group by中不可以使用列别名. 语法:select column_name,aggregate_function(column_name) from table_name where column_name operator value gro…