- mysql 查询
- 基本查询
select * from users;
- 去重
select distinct(name),high from users order by high desc; ## 注意 distinct必须放在第一位,desc降序,distinct不会对结果进行排序
select * from users group by name;
- 过滤
select * from users limit 3 order by desc;
- 聚合函数
select * from users;
select distinct(name),high from users order by high desc; ## 注意 distinct必须放在第一位,desc降序,distinct不会对结果进行排序
select * from users group by name;
select * from users limit 3 order by desc;