having 与where的共同点: having 和where都是用来筛选的 不同点: having是用来筛选组 where是用来筛选记录 用having就一定要用group by连用 当用group by时不一定要用having