列的别名不能在SELECT中的其他别名表达式中使用。
HAVING 是对分组条件进行过滤的筛选器。
DISTINCT操作的列添加了一个唯一索引,对于使用GROUP BY的查询,再使用DISTINCT是多余的,因为已经分组,不会移除任何行。