数据抽出选项
===
## 知识点
- order by
- limit
- offset
## 实战
```
> select * from users order by score asc;
> select * from users order by score desc;
> select * from users order by team;
> select * from users order by team,score;
> select * from users order by team desc,score desc;
> select * from users order by score desc limit 3 offset 1;
```
## 分页算法:
```
sql:`select * from tab_name limit 3 offset (1-1)*3`偏移数:计算 (page - 1) \* limit
```