示例SQL语句:
select distinct(字段名),聚合函数(字段名) from 表名1 join 表名2 on 表名1.字段名 = 表名2.字段名 where 字段名 = 值
group by 字段名 having 聚合函数(字段名)> 80 order by 字段名 limit 条数;
执行顺序:
from -> on -> join -> where -> group by -> 聚合函数-> having -> select -> distinct -> order by -> limit
备注:
limit 0, 50 0为行数1,50为条数;
同写法: limit 50