Verified Commit b548a3d2 authored by Kiryuu Sakuya's avatar Kiryuu Sakuya 🎵
Browse files

Update No.4

parent 99016745
......@@ -15,11 +15,36 @@ SELECT emp_no, emp_name, emp_salary FROM employee WHERE emp_title LIKE "%经理%
#### 2. 查找出姓“张”并且姓名最后一个字为“鸣”的员工
#### 3. 查找住在广州或北京的女员工,并显示其姓名、所属部门 、职称、住址
```mysql
SHOW FULL COLUMNS FROM employee;
SELECT emp_name FROM employee WHERE emp_name LIKE "张%鸣";
```
#### 3. 查找住在广州或北京的女员工,并显示其姓名、所属部门、职称、住址
> 傻子把中华人民共和国在前面了!
```mysql
SHOW FULL COLUMNS FROM employee;
SELECT emp_name, emp_dept, emp_title, emp_addr FROM employee WHERE emp_addr LIKE "广州%" OR emp_addr LIKE "北京%" OR emp_addr LIKE "中华人民共和国北京%";
```
#### 4. 在表 sales 中挑出销售金额大于等于 100 元订单
```mysql
SHOW FULL COLUMNS FROM sales;
SELECT * FROM sales WHERE tot_amt >= 100;
```
#### 5. 选取订单金额由高到低排序的前 10% 订单数据
#### 4. 在表 sales 中跳出销售金额大于等于 100 元订单
```mysql
SHOW FULL COLUMNS FROM sales;
# 排序由大到小输出可以用 SELECT * from sales ORDER BY tot_amt DESC;
# 排序从小到大输出可以用 SELECT * from sales ORDER BY tot_amt ASC;
#### 5. 选取订单金额最高的的前 10% 的订单数据
# 看前三条就是 SELECT * from sales ORDER BY tot_amt DESC LIMIT 3;
```
#### 6. 查找出职称为经理或职称为会计的女员工的信息
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment