来源:https://stackoverflow.com/questions/64025684/how-to-use-group-by-in-a-query-while-using-variables 标签 mysql sql mysql-5.7