diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/grant.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/grant.md"
index bdef587521babff80e053ec0cea8685dd835edd3..51c00a7c3fe2be8fc91e26041a0ed564353672c3 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/grant.md"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/grant.md"
@@ -1,41 +1,41 @@
 # 授权
 
-管理员要给用户 fred 授权,允许他查询 emplyee 表,应用哪一条语句?
+管理员要给用户 joe 授权,允许他查询 emplyee 表,应用哪一条语句?
 
 ## 答案
 
-```postgresql
-grant select on table employee to fred;
+```mysql
+grant select on table employee to joe;
 ```
 
 ## 选项
 
 ### 权限名错误
 
-```postgresql
-grant query on table employee to fred;```
+```mysql
+grant query on table employee to joe;
 ```
 
 ### 权限名错误
 
-```postgresql
-grant read on table employee to fred;```
+```mysql
+grant read on table employee to joe;
 ```
 
 ### 操作关键词错误
 
-```postgresql
-grant select on table employee of fred;```
+```mysql
+grant select on table employee of joe;
 ```
 
 ### 操作错误
 
-```postgresql
-grant select on table employee.* of fred;```
+```mysql
+grant select on table employee.* of joe;
 ```
 
 ### 权限过高
 
-```postgresql
-grant all on table employee to fred;```
+```mysql
+grant all on table employee to joe;
 ```
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/revoke.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/revoke.md"
index 815419a607066180bcbb1201bcaf34df119847f9..d135ef0a18eb3227fa8dd0320a9fee694734b447 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/revoke.md"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/revoke.md"
@@ -5,7 +5,7 @@
 
 ## 答案
 
-```postgresql
+```mysql
 revoke select on trade from fred;
 ```
 
@@ -13,19 +13,19 @@ revoke select on trade from fred;
 
 ### 操作错误
 
-```postgresql
+```mysql
 grant not select on trade to fred;
 ```
 
 ### 操作关键字错误
 
-```postgresql
+```mysql
 revoke select on trade to fred;
 ```
 
 ### 指定权限错误
 
-```postgresql
+```mysql
 revoke owned trade from fred;
 ```
 
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/role.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/role.md"
index 575f9292e053b22f2507e98c1b598b058d894785..f87c1fe3293cb8d0fddacdd1e041b6684381fa3d 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/role.md"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/1.\347\224\250\346\210\267\345\222\214\346\235\203\351\231\220/role.md"
@@ -1,36 +1,39 @@
 # 角色
 
-你是 rental dvd 公司的数据库管理员,公司数据分析组有 Fred、Alice、James、Jone 四位成员,现在你需要给数据分析组授权,允许他们
-查询 trade 数据库的 public schema 中的所有表,规范的操作应该是
+Joe 现在是团队的 DBA,公司数据分析组有 Fred、Alice、James、Jone 四位成员,现在Joe需要给数据分析组授权,允许他们
+查询 goods 数据库中的所有表,*规范*的操作应该是
 
 ## 答案
 
-```postgresql
+```mysql
 create role analysis;
 grant analysis to fred, alice, james, jone;
-grant select on all tables in schema public to analysis;
+grant select on  goods.* to analysis;
+flush privileges;
 ```
 
 ## 选项
 
 ### 将来人员变动管理会很繁琐
 
-```postgresql
-grant select on all tables in schema public to fred, alice, james, jone;
+```mysql
+grant select on goods.* to fred, alice, james, jone;
 ```
 
-### 过度授权
+### 错误的语法
 
-```postgresql
+```mysql
 create role analysis;
 grant analysis to fred, alice, james, jone;
-grant all on all tables in schema public to analysis;
+grant all on all tables in schema goods to analysis;
+flush privileges;
 ```
 
-### 语句不完整
+### 过度授权
 
-```postgresql
+```mysql
 create role analysis;
 grant analysis to fred, alice, james, jone;
-grant select on all to analysis;
+grant select on *.* to analysis;
+flush privileges ;
 ```
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/serial.json" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/auto_increment.json"
similarity index 79%
rename from "data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/serial.json"
rename to "data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/auto_increment.json"
index 6b3b18ac436e6ec7c8232074c7263bc92f1e8afd..6db172b7463c0fbb675d715f9e1231d340967e68 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/serial.json"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/auto_increment.json"
@@ -1,7 +1,7 @@
 {
   "type": "code_options",
   "author": "ccat",
-  "source": "serial.md",
+  "source": "auto_increment.md",
   "notebook_enable": false,
   "exercise_id": "ac5111c4826b48659e6ba60aa614706d"
 }
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/auto_increment.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/auto_increment.md"
new file mode 100644
index 0000000000000000000000000000000000000000..c6a3c77dc0cbe6690794f02597a8623bb9b9287a
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/auto_increment.md"
@@ -0,0 +1,22 @@
+# 自增序列
+
+关于 MySQL 的自增字段,错误的说法是
+
+## 答案
+
+自增字段必须名为 id。
+
+## 选项
+
+### 自增字段只能主键,每个表至多只能有一个
+
+自增字段必须是主键。
+
+### B
+
+插入操作失败,自增计数仍然会被递增,下次操作使用下一个整数。
+
+### C
+
+自增字段默认从 1 开始。
+
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/config.json" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/config.json"
index 953be254bd8860a49c8f466b0c527c5cdaf5009d..0d3e2a173bc9de19e68698ab7bec2d532a1c9e33 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/config.json"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/config.json"
@@ -8,7 +8,7 @@
   "export": [
     "table.json",
     "create_table.json",
-    "serial.json"
+    "auto_increment.json"
   ],
   "keywords_must": [
     "表",
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/create_table.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/create_table.md"
index 570e2c59ecb4d642a7b12d4d70aec87ba1e16fd9..94c72fa60d05b3c5241e59c6c608f6712d3ec20e 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/create_table.md"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/create_table.md"
@@ -1,14 +1,14 @@
 # 建表语句
 
-现在我们尝试建立一个简化的交易流水表 trade,需要一个自增主键,一个content字段保存订单详情,,
+现在Joe 需要建立一个简化的交易流水表 trade,需要一个自增主键,一个content字段保存订单详情,,
 需要有一个时间戳字段记录订单入库时间,那么哪一个语句是对的?
 
 ## 答案
 
-```postgresql
+```mysql
 create table trade (
-    id serial primary key,
-    content text,
+    id int primary key auto_increment,
+    content varchar(8000),
     created_at timestamp default now()
 );
 ```
@@ -17,30 +17,30 @@ create table trade (
 
 ### 主键没有设置自增,不符合题意
 
-```postgresql
+```mysql
 create table trade (
     id integer primary key,
-    content text,
+    content varchar(8000),
     created_at timestamp default now()
 );
 ```
 
 ### 时间戳没有设置默认值
 
-```postgresql
+```mysql
 create table trade (
     id serial primary key,
-    content text,
+    content varchar(8000),
     created_at timestamp
 );
 ```
 
 ###  没有主键,不符合题设
 
-```postgresql
+```mysql
 create table trade (
     id serial,
-    content text,
+    content varchar(8000),
     created_at timestamp default now()
 );
 ```
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/serial.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/serial.md"
deleted file mode 100644
index 987689e82ca4ce5c3880193ad640f1a81b96972d..0000000000000000000000000000000000000000
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/2.\350\241\250/serial.md"
+++ /dev/null
@@ -1,25 +0,0 @@
-# 自增序列
-
-PostgreSQL 表中的自增列 serial 的底层实现机制是:
-
-## 答案
-
-绑定 sequence 对象的表达式默认值
-
-## 选项
-
-### PG采用的是独立的序列器
-
-auto increment 计数器
-
-### B
-
-触发器
-
-### C
-
-系统表
-
-### D
-
-Serial 文件
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/3.\350\247\206\345\233\276/config.json" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/3.\350\247\206\345\233\276/config.json"
index 81a7a81fa48397fdad6d1041f0096eb5066f539e..451352094fdd569cf3c40cb34e185ddfc710f03e 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/3.\350\247\206\345\233\276/config.json"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/3.\350\247\206\345\233\276/config.json"
@@ -1,8 +1,12 @@
 {
   "node_id": "mysql-98e926730d844f238dc9cd8ac5f65126",
-  "keywords": ["view"],
+  "keywords": [
+    "view"
+  ],
   "children": [],
-  "export": [],
+  "export": [
+    "view.json"
+  ],
   "keywords_must": [],
   "keywords_forbid": [],
   "group": 0
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/3.\350\247\206\345\233\276/view.json" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/3.\350\247\206\345\233\276/view.json"
new file mode 100644
index 0000000000000000000000000000000000000000..0ae2d89d235c9c6acd5ddf71906184b0ca23fef5
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/3.\350\247\206\345\233\276/view.json"
@@ -0,0 +1,7 @@
+{
+  "type": "code_options",
+  "author": "ccat",
+  "source": "view.md",
+  "notebook_enable": false,
+  "exercise_id": "0d485e3ba6e448edbe727da0f1cf8685"
+}
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/3.\350\247\206\345\233\276/view.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/3.\350\247\206\345\233\276/view.md"
new file mode 100644
index 0000000000000000000000000000000000000000..6f75bc10807ba76a589d16fbc52d0777f57fed8b
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/3.\350\247\206\345\233\276/view.md"
@@ -0,0 +1,72 @@
+# 视图
+
+Joe 需要给 goods 表
+
+```mysql
+create table goods(
+    id int primary key auto_increment,
+    category_id int,
+    category varchar(64),
+    name varchar(256),
+    price decimal(12, 4),
+    stock int,
+    upper_time timestamp
+)
+```
+
+添加一个视图,仅展示价格超过 1000 的商品价格和名称,下列选项中正确的是:
+
+## 答案
+
+```mysql
+CREATE VIEW view_name_price 
+    AS 
+    SELECT name, price 
+    FROM goods
+    WHERE price > 1000;
+```
+
+## 选项
+
+### A
+
+```mysql
+CREATE VIEW view_name_price 
+    AS 
+    SELECT name, price 
+    FROM goods;
+```
+
+### B
+
+```mysql
+CREATE VIEW view_name_price 
+    AS 
+    SELECT * 
+    FROM goods
+    WHERE price > 1000;
+```
+
+### C
+
+```mysql
+CREATE VIEW view_name_price
+    AS 
+BEGIN
+    SELECT name, price
+    FROM goods
+    WHERE price > 1000;
+END;
+```
+
+### D
+
+```mysql
+CREATE VIEW view_name_price
+    AS 
+BEGIN
+    SELECT name, price
+    FROM goods
+    WHERE price > 1000;
+END;
+```
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/config.json" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/config.json"
index 33086e1ebdd27352e5daa48d71a1ba8f5263130e..8053b22f3318ed095bf074a6d33f6ca2bb2a263f 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/config.json"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/config.json"
@@ -1,16 +1,12 @@
 {
-  "node_id": "mysql-a6b27f219f3c47c981ed1dceffa8a1a6",
+  "node_id": "mysql-98e926730d844f238dc9cd8ac5f65126",
   "keywords": [
-    "函数",
-    "function"
+    "produce", "function"
   ],
   "children": [],
   "export": [
-    "function.json"
   ],
-  "keywords_must": [
-    "函数",
-    "function"
-  ],
-  "keywords_forbid": []
+  "keywords_must": [],
+  "keywords_forbid": [],
+  "group": 0
 }
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/function.json" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/function.json"
deleted file mode 100644
index cf6885e24474f3f8a168a53814d66ea33231ddf7..0000000000000000000000000000000000000000
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/function.json"
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "type": "code_options",
-  "author": "ccat",
-  "source": "function.md",
-  "notebook_enable": false,
-  "exercise_id": "65ba04e19bad4538a4af9b3da275fe68"
-}
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/function.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/function.md"
deleted file mode 100644
index 7f0e0493ed0b4a7a911ce4f980e6feeeff9a1f33..0000000000000000000000000000000000000000
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/function.md"
+++ /dev/null
@@ -1,29 +0,0 @@
-# 函数
-
-关于 PostgreSQL 函数,错误的是:
-
-## 答案
-
-函数必须是无副作用的
-
-## 选项
-
-### A
-
-函数可以用 SQL 写,也可以用 PLPGSQL,还可以用 Python、Perl、LUA等语言。
-
-### B
-
-函数的参数和返回值可以是简单变量,也可以是结果集或自定义类型
-
-### C
-
-函数可以递归引用
-
-### D
-
-函数之间可以互相引用
-
-### E
-
-函数的使用权限可以通过 grant/revoke/deny 管理
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/node.txt" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/node.txt"
index 8bb14d03fbd9ef596a475f335e7a8025b307efa2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/node.txt"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/4.\345\255\230\345\202\250\350\277\207\347\250\213\345\222\214\345\207\275\346\225\260/node.txt"
@@ -1 +0,0 @@
-第十六章
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/primary_key.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/primary_key.md"
index 72fd10d17199abad5606fa37d93c5177d12a06d3..a032823b13189e711a37711ff4bed7cab1778aa1 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/primary_key.md"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/primary_key.md"
@@ -1,6 +1,6 @@
 # 主键
 
-关于 PostgreSQL 的主键,哪一项是错误的?
+关于 MySQL 的主键,哪一项是错误的?
 
 ## 答案
 
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/unique.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/unique.md"
index 431506fc5c25b11bd2a1e5f255481c06e5997a2c..a4deb8ca83939d76a845f1be936b306ae4fbbf41 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/unique.md"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/unique.md"
@@ -2,13 +2,12 @@
 
 现有一个图书登记表:
 
-```postgresql
+```mysql
 create table book(
-    id serial primary key ,
+    id int primary key auto_increment,
     title text,
     publish_at date,
-    isbn text,
-    meta jsonb default '{}'::jsonb
+    isbn text
 )
 ```
 
@@ -16,7 +15,7 @@ create table book(
 
 1. 删除id列,将isbn设置为主键
 2. 在 isbn 列上加唯一约束
-3. 执行 `create index on book(id, title, publish_at, isbn, meta)`
+3. 执行 `create index on book(id, title, publish_at, isbn)`
 4. 在 id 键上加唯一约束
 
 ## 答案
diff --git "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/unique_2.md" "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/unique_2.md"
index ab9a1a6b63c945e23c6319e29237e5a40c421e94..cd11c2da1487b451207dcde99ff613d7479d8b77 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/unique_2.md"
+++ "b/data/2.MySQL\344\270\255\351\230\266/1.\346\225\260\346\215\256\345\272\223\347\273\204\346\210\220/5.\347\264\242\345\274\225\345\222\214\347\272\246\346\235\237/unique_2.md"
@@ -2,13 +2,12 @@
 
 现有一个图书登记表:
 
-```postgresql
+```mysql
 create table book(
-    id serial primary key ,
+    id int primary key auto_increment,
     title text,
     publish_at date,
-    isbn text,
-    meta jsonb default '{}'::jsonb
+    isbn text
 )
 ```
 
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/1. \345\210\253\345\220\215/aliases.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/1. \345\210\253\345\220\215/aliases.json"
new file mode 100644
index 0000000000000000000000000000000000000000..3ce01c99c0ba8c782f7ffa687e9ccc964e339103
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/1. \345\210\253\345\220\215/aliases.json"	
@@ -0,0 +1,7 @@
+{
+  "type": "code_options",
+  "author": "ccat",
+  "source": "aliases.md",
+  "notebook_enable": false,
+  "exercise_id": "7a6d06703d1448209e9d82074d1887fb"
+}
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/1. \345\210\253\345\220\215/aliases.md" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/1. \345\210\253\345\220\215/aliases.md"
new file mode 100644
index 0000000000000000000000000000000000000000..b77c507eb7d8fb49122e7cac6c04101223f6b2a4
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/1. \345\210\253\345\220\215/aliases.md"	
@@ -0,0 +1,42 @@
+# 别名
+
+关于别名,以下说法中正确的是:
+
+1. 查询集(表或子查询)可以指定别名
+2. 查询集的列可以指定别名
+3. 别名只能用合法的变量名,即字母开头,只由英文数字、字母和下划线组成
+4. 可以用双引号或反引号将别名包围起来
+
+## 答案
+
+```
+1, 2, 4
+```
+
+## 选项
+
+### A
+
+全部都对
+
+### B
+
+全都不对
+
+### C
+
+```
+2, 4
+```
+
+### D
+
+```
+2, 3, 4
+```
+
+### E
+
+````
+3, 4
+````
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/1. \345\210\253\345\220\215/config.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/1. \345\210\253\345\220\215/config.json"
index 8be5e3d4d628114869e228b55bca5f178eca7867..40acd72b63db43f0d4fdf5ff54075c87ce8d33e9 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/1. \345\210\253\345\220\215/config.json"	
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/1. \345\210\253\345\220\215/config.json"	
@@ -2,7 +2,9 @@
   "node_id": "mysql-1d350c6226d443bdb76b5058d8ee23e7",
   "keywords": [],
   "children": [],
-  "export": [],
+  "export": [
+    "aliases.json"
+  ],
   "keywords_must": [],
   "keywords_forbid": [],
   "group": 0
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/2. WHERE/between.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/2. WHERE/between.json"
new file mode 100644
index 0000000000000000000000000000000000000000..a0ed882e63650c2ff60b5969c5a8ca8e9aef8dc4
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/2. WHERE/between.json"	
@@ -0,0 +1,7 @@
+{
+  "type": "code_options",
+  "author": "ccat",
+  "source": "between.md",
+  "notebook_enable": false,
+  "exercise_id": "6ad1d6bd4fa7421890b7498b5648b4e0"
+}
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/2. WHERE/between.md" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/2. WHERE/between.md"
new file mode 100644
index 0000000000000000000000000000000000000000..98c77d31938b9fbd24f29e9a700f200caaae6020
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/2. WHERE/between.md"	
@@ -0,0 +1,43 @@
+# Between
+
+Joe 要查询 goods 表
+```mysql
+create table goods(
+    id int primary key auto_increment,
+    category_id int,
+    category varchar(64),
+    name varchar(256),
+    price decimal(12, 4),
+    stock int,
+    upper_time timestamp
+)
+```
+中价格在 1000 到 2000 之间(包含1000和2000)的数据,以下查询中错误的是:
+
+## 答案
+
+```mysql
+SELECT * FROM goods HAVING price BETWEEN 1000 AND 2000;
+```
+
+
+## 选项
+
+### A
+
+```mysql
+SELECT * FROM goods WHERE price BETWEEN 1000 AND 2000;
+```
+
+### B
+
+```mysql
+SELECT * FROM goods WHERE price >= 1000 AND price <= 2000;
+```
+
+### C
+
+```mysql
+SELECT * FROM goods WHERE not (price < 1000 or price > 2000);
+```
+
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/2. WHERE/config.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/2. WHERE/config.json"
index f4358b912114caa1afecf72ecc4d2f6eb2b42f17..af1232b5853ef8c6fde9adc13c1d5f196ed14605 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/2. WHERE/config.json"	
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/2. WHERE/config.json"	
@@ -2,7 +2,9 @@
   "node_id": "mysql-2296dbe96d584a52bd28a3ad5f655518",
   "keywords": [],
   "children": [],
-  "export": [],
+  "export": [
+    "between.json"
+  ],
   "keywords_must": [],
   "keywords_forbid": [],
   "group": 0
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/3.CASE/config.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/3.CASE/config.json"
index 62d79df737e80465d449f7d6394a3e7553854a9d..4e8313d5188037c97e01f2aa7b4f9c47cdcf174e 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/3.CASE/config.json"	
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/3.CASE/config.json"	
@@ -1,8 +1,10 @@
 {
   "node_id": "mysql-8e6cd4d5f4b446a2bc3f5402de9bd49c",
-  "keywords": [],
+  "keywords": ["case", "pivot", "透视表"],
   "children": [],
-  "export": [],
+  "export": [
+    "pivot.json"
+  ],
   "keywords_must": [],
   "keywords_forbid": [],
   "group": 0
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/3.CASE/pivot.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/3.CASE/pivot.json"
new file mode 100644
index 0000000000000000000000000000000000000000..e3606514f2cac9268a744e730a6ce971bc26e451
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/3.CASE/pivot.json"	
@@ -0,0 +1,7 @@
+{
+  "type": "code_options",
+  "author": "ccat",
+  "source": "pivot.md",
+  "notebook_enable": false,
+  "exercise_id": "d61198987832488ab53e8a18f7337946"
+}
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/3.CASE/pivot.md" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/3.CASE/pivot.md"
new file mode 100644
index 0000000000000000000000000000000000000000..b1e6373667e2cb16d3f83bbb9f8273f7296e4164
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/3.CASE/pivot.md"	
@@ -0,0 +1,89 @@
+# 透视表
+
+现有销售记录表
+
+```mysql
+create table sales(
+    id serial primary key ,
+    sku_id integer not null ,
+    amount decimal(12, 4),
+    created_at timestamp default now()
+);
+create index idx_created_at on sales(created_at);
+```
+
+现在我们希望对这个表做一个月度的透视汇总,得到2021年每个月每种商品(sku_id)的的销售总额,每个月一列,哪一项可以实现?
+
+## 答案
+
+```mysql
+select sku_id, 
+       sum(case extract(month from created_at) when 1 then amount else 0 end) as Jan,
+       sum(case extract(month from created_at) when 2 then amount else 0 end) as Feb,
+       sum(case extract(month from created_at) when 3 then amount else 0 end) as Mar,
+       sum(case extract(month from created_at) when 4 then amount else 0 end) as Apr,
+       sum(case extract(month from created_at) when 5 then amount else 0 end) as May,
+       sum(case extract(month from created_at) when 6 then amount else 0 end) as June,
+       sum(case extract(month from created_at) when 7 then amount else 0 end) as July,
+       sum(case extract(month from created_at) when 8 then amount else 0 end) as Aug,
+       sum(case extract(month from created_at) when 9 then amount else 0 end) as Sept,
+       sum(case extract(month from created_at) when 10 then amount else 0 end) as Oct,
+       sum(case extract(month from created_at) when 11 then amount else 0 end) as Nov,
+       sum(case extract(month from created_at) when 12 then amount else 0 end) as Dec
+from sales
+where created_at between '2020-01-01'::timestamp and '2021-01-01'::timestamp
+group by sku_id; 
+```
+
+## 选项
+
+### 格式不相符
+
+```mysql
+select sku_id, extract(month from created_at) as month, sum(amount) 
+from sales
+where created_at between '2020-01-01'::timestamp and '2021-01-01'::timestamp
+group by 1, 2; 
+```
+
+### 计算逻辑错误
+
+```mysql
+select sku_id, 
+       sum(amount) as Jan,
+       sum(amount) as Feb,
+       sum(amount) as Mar,
+       sum(amount) as Apr,
+       sum(amount) as May,
+       sum(amount) as June,
+       sum(amount) as July,
+       sum(amount) as Aug,
+       sum(amount) as Sept,
+       sum(amount) as Oct,
+       sum(amount) as Nov,
+       sum(amount) as Dec
+from sales
+where created_at between '2020-01-01'::timestamp and '2021-01-01'::timestamp
+group by sku_id, extract(month from created_at); 
+```
+
+### 计算格式错误
+
+```mysql
+select sku_id, 
+       sum(amount having extract(month from created_at) = 1) as Jan,
+       sum(amount having extract(month from created_at) = 2) as Feb,
+       sum(amount having extract(month from created_at) = 3) as Mar,
+       sum(amount having extract(month from created_at) = 4) as Apr,
+       sum(amount having extract(month from created_at) = 5) as May,
+       sum(amount having extract(month from created_at) = 6) as June,
+       sum(amount having extract(month from created_at) = 7) as July,
+       sum(amount having extract(month from created_at) = 8) as Aug,
+       sum(amount having extract(month from created_at) = 9) as Sept,
+       sum(amount having extract(month from created_at) = 10) as Oct,
+       sum(amount having extract(month from created_at) = 11) as Nov,
+       sum(amount having extract(month from created_at) = 12) as Dec
+from sales
+where created_at between '2020-01-01'::timestamp and '2021-01-01'::timestamp
+group by sku_id, extract(month from created_at); 
+```
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/4.DISTINCT/config.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/4.DISTINCT/config.json"
index 59664b0afbcaa5420f9587ac307e7b2b7d1e68c9..86aded8d6b13e3d03e1faad04186a92b53bac1f5 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/4.DISTINCT/config.json"	
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/4.DISTINCT/config.json"	
@@ -1,8 +1,12 @@
 {
   "node_id": "mysql-153ce0dadc824af98de199f193c8c75c",
-  "keywords": ["distinct"],
+  "keywords": [
+    "distinct"
+  ],
   "children": [],
-  "export": [],
+  "export": [
+    "distinct.json"
+  ],
   "keywords_must": [],
   "keywords_forbid": [],
   "group": 0
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/4.DISTINCT/distinct.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/4.DISTINCT/distinct.json"
new file mode 100644
index 0000000000000000000000000000000000000000..3efcec8ea00b46c535947a3f06d54a0142b38e67
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/4.DISTINCT/distinct.json"	
@@ -0,0 +1,7 @@
+{
+  "type": "code_options",
+  "author": "ccat",
+  "source": "distinct.md",
+  "notebook_enable": false,
+  "exercise_id": "331f369b150340f9989ccea8abfcd42f"
+}
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/4.DISTINCT/distinct.md" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/4.DISTINCT/distinct.md"
new file mode 100644
index 0000000000000000000000000000000000000000..9eb11bca5fcd0d45ffcd20a4380df5f84def3a7b
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/4.DISTINCT/distinct.md"	
@@ -0,0 +1,49 @@
+# Distinct
+
+Joe 想统计以下 goods 表
+
+```mysql
+create table goods(
+    id int primary key auto_increment,
+    category_id int,
+    category varchar(64),
+    name varchar(256),
+    price decimal(12, 4),
+    stock int,
+    upper_time timestamp
+)
+```
+
+中的商品有多少种不同的价格,他应该如何写这条查询?
+
+## 答案
+
+```mysql
+select count(distinct price) from goods;
+```
+
+## 选项
+
+### A
+
+```mysql
+select count(distinct *) from goods;
+```
+
+### B
+
+```mysql
+select distinct count(price) from goods;
+```
+
+### C
+
+```mysql
+select count(price) from goods;
+```
+
+### D
+
+```mysql
+select distinct price from goods;
+```
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/5.ORDER BY/config.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/5.ORDER BY/config.json"
index e2cdbd593d8a721d03d61eb7ffa7f782c437b7c3..e8aa574e7fa41be3c684bb9c4af6ebee4696b97a 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/5.ORDER BY/config.json"	
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/5.ORDER BY/config.json"	
@@ -2,7 +2,9 @@
   "node_id": "mysql-fa20a81805b44975aed265dd058c542a",
   "keywords": [],
   "children": [],
-  "export": [],
+  "export": [
+    "order_by.json"
+  ],
   "keywords_must": [],
   "keywords_forbid": [],
   "group": 0
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/5.ORDER BY/order_by.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/5.ORDER BY/order_by.json"
new file mode 100644
index 0000000000000000000000000000000000000000..d564234ccb3f1cbdcfbf926a262f3c84aa8fd960
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/5.ORDER BY/order_by.json"	
@@ -0,0 +1,7 @@
+{
+  "type": "code_options",
+  "author": "ccat",
+  "source": "order_by.md",
+  "notebook_enable": false,
+  "exercise_id": "68e526b5717246a190e6bb06ad3e58ac"
+}
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/5.ORDER BY/order_by.md" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/5.ORDER BY/order_by.md"
new file mode 100644
index 0000000000000000000000000000000000000000..f0b756a1eeeb8ce007bfe84712924a185d2e8e8d
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/5.ORDER BY/order_by.md"	
@@ -0,0 +1,52 @@
+# 排序
+
+Joe 需要根据员工表
+
+```mysql
+create table employee
+(
+    id     serial primary key,
+    name   varchar(256),
+    dept   varchar(256),
+    salary decimal(12, 4)
+);
+```
+
+生成一份报表,首先按部门名称的字典序排序,部门内部按员工工资从高到低排列,那么这个查询应该是:
+
+## 答案
+
+```mysql
+select id, name, dept, salary from employee order by dept, salary desc;
+```
+
+## 选项
+
+### A
+
+```mysql
+select id, name, dept, salary from employee order by dept, salary;
+```
+
+### B
+
+```mysql
+select id, name, dept, salary from employee order by dept desc, salary desc;
+```
+
+### C
+```mysql
+select id, name, dept, salary from employee order by dept and salary desc;
+```
+
+### D
+
+```mysql
+select id, name, dept, salary from employee order by dept, salary, id, name;
+```
+
+### E
+```mysql
+select id, name, dept, salary from employee order by dept, salary desc;
+```
+
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/8. \345\210\206\351\241\265\346\237\245\350\257\242/paged.json" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/8. \345\210\206\351\241\265\346\237\245\350\257\242/paged.json"
index 0518fa861b1a1fc7e155abde72ffd20b977902f6..8d8faf23aa9b26acb5eb120a2ff32d5b6ca1fc46 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/8. \345\210\206\351\241\265\346\237\245\350\257\242/paged.json"	
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/8. \345\210\206\351\241\265\346\237\245\350\257\242/paged.json"	
@@ -3,5 +3,5 @@
   "author": "ccat",
   "source": "paged.md",
   "notebook_enable": false,
-  "exercise_id": "68e526b5717246a190e6bb06ad3e58ac"
+  "exercise_id": "b80577df526846bb8eccf638480a0170"
 }
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/8. \345\210\206\351\241\265\346\237\245\350\257\242/paged.md" "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/8. \345\210\206\351\241\265\346\237\245\350\257\242/paged.md"
index 9ca4cf87f3ca024214fab885434b9a3a2cd1ad6a..24705bec8623242c27a13e41e15107b5cae22df5 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/8. \345\210\206\351\241\265\346\237\245\350\257\242/paged.md"	
+++ "b/data/2.MySQL\344\270\255\351\230\266/2. \346\237\245\350\257\242/8. \345\210\206\351\241\265\346\237\245\350\257\242/paged.md"	
@@ -2,7 +2,7 @@
 
 我们有如下订单表:
 
-```postgresql
+```mysql
 create table orders
 (
     id          serial primary key,
@@ -17,7 +17,7 @@ create table orders
 
 ## 答案
 
-```postgresql
+```mysql
 select id, product_id, order_date, quantity, customer_id
 from orders
 where date = $1
@@ -28,7 +28,7 @@ offset $2 limit 100;
 
 ### 缺少 limit
 
-```postgresql
+```mysql
 select id, product_id, order_date, quantity, customer_id
 from orders
 where date = $1
@@ -37,7 +37,7 @@ offset $2;
 
 ### 缺少 offset
 
-```postgresql
+```mysql
 select id, product_id, order_date, quantity, customer_id
 from orders
 where date = $1; 
@@ -45,7 +45,7 @@ where date = $1;
 
 ### 结构不对
 
-```postgresql
+```mysql
 select id, product_id, order_date, quantity, customer_id
 from orders
 where date = $1 and
diff --git "a/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/6.HAVING/config.json" "b/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/6.HAVING/config.json"
index ec39933db960f565a0be5d7819d7c53830f584f7..2751d3b5d693c7646d15a5aeed665a2eb24fdd6c 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/6.HAVING/config.json"
+++ "b/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/6.HAVING/config.json"
@@ -2,7 +2,9 @@
   "node_id": "mysql-3b85e53dd88146798d21b7254ad85cae",
   "keywords": [],
   "children": [],
-  "export": [],
+  "export": [
+    "having.json"
+  ],
   "keywords_must": [],
   "keywords_forbid": [],
   "group": 0
diff --git "a/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/6.HAVING/having.json" "b/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/6.HAVING/having.json"
new file mode 100644
index 0000000000000000000000000000000000000000..5cb8deb3327e620f720e4c821994610f4873fdba
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/6.HAVING/having.json"
@@ -0,0 +1,7 @@
+{
+  "type": "code_options",
+  "author": "ccat",
+  "source": "having.md",
+  "notebook_enable": false,
+  "exercise_id": "2e74213549474ee680f4b72cde1a5b45"
+}
\ No newline at end of file
diff --git "a/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/6.HAVING/having.md" "b/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/6.HAVING/having.md"
new file mode 100644
index 0000000000000000000000000000000000000000..4aeacf5f5460cfe10eb7092f74a5bc9295b86c69
--- /dev/null
+++ "b/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/6.HAVING/having.md"
@@ -0,0 +1,49 @@
+# Having
+
+ Joe 要从 employee 表
+ 
+```mysql
+create table employee
+(
+    id     serial primary key,
+    name   varchar(256),
+    dept   varchar(256),
+    salary decimal(12, 4)
+);
+```
+
+中得到每月工资开支超过十万的部门,这个查询应该怎么写?
+
+## 答案
+
+```mysql
+select dept from employee group by dept having sum(salary) > 100000;
+```
+
+## 选项
+
+### A
+
+```mysql
+select dept from employee group by dept where sum(salary) > 100000;
+```
+
+### B
+
+```mysql
+select dept from employee where sum(salary) > 100000 group by dept;
+```
+
+### C
+
+```mysql
+select dept from employee where sum(salary) > 100000 order by dept;
+```
+
+### D
+
+```mysql
+select dept from employee group by dept where sum(salary) > 100000;
+```
+
+
diff --git "a/data/2.MySQL\344\270\255\351\230\266/4.\350\277\236\346\216\245\346\237\245\350\257\242/5. \345\244\215\346\235\202\350\277\236\346\216\245/config.json" "b/data/2.MySQL\344\270\255\351\230\266/4.\350\277\236\346\216\245\346\237\245\350\257\242/5. \345\244\215\346\235\202\350\277\236\346\216\245/config.json"
index 3c9897232625606662224e7132ed4326e9b38477..7fccf37c954b6fa096f3c3a47578b4e3250a33ed 100644
--- "a/data/2.MySQL\344\270\255\351\230\266/4.\350\277\236\346\216\245\346\237\245\350\257\242/5. \345\244\215\346\235\202\350\277\236\346\216\245/config.json"	
+++ "b/data/2.MySQL\344\270\255\351\230\266/4.\350\277\236\346\216\245\346\237\245\350\257\242/5. \345\244\215\346\235\202\350\277\236\346\216\245/config.json"	
@@ -2,7 +2,9 @@
   "node_id": "mysql-a4773004e0cf432aa7ccdf6b9490838f",
   "keywords": [],
   "children": [],
-  "export": [],
+  "export": [
+    "salary.json"
+  ],
   "keywords_must": [],
   "keywords_forbid": [],
   "group": 0
diff --git "a/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/salary.json" "b/data/2.MySQL\344\270\255\351\230\266/4.\350\277\236\346\216\245\346\237\245\350\257\242/5. \345\244\215\346\235\202\350\277\236\346\216\245/salary.json"
similarity index 100%
rename from "data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/salary.json"
rename to "data/2.MySQL\344\270\255\351\230\266/4.\350\277\236\346\216\245\346\237\245\350\257\242/5. \345\244\215\346\235\202\350\277\236\346\216\245/salary.json"
diff --git "a/data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/salary.md" "b/data/2.MySQL\344\270\255\351\230\266/4.\350\277\236\346\216\245\346\237\245\350\257\242/5. \345\244\215\346\235\202\350\277\236\346\216\245/salary.md"
similarity index 100%
rename from "data/2.MySQL\344\270\255\351\230\266/3.\350\201\232\345\220\210\345\222\214\345\210\206\347\273\204/salary.md"
rename to "data/2.MySQL\344\270\255\351\230\266/4.\350\277\236\346\216\245\346\237\245\350\257\242/5. \345\244\215\346\235\202\350\277\236\346\216\245/salary.md"
diff --git a/data/tree.json b/data/tree.json
index dcb3cb61b8ee748ad850cc1fd474bc08a8daf161..154b81f64517735cb732542448f0a0a65bbbe0d9 100644
--- a/data/tree.json
+++ b/data/tree.json
@@ -296,7 +296,10 @@
                   {
                     "mysqladmin": {
                       "node_id": "mysql-daca74b56aca48cea2da14078b518051",
-                      "keywords": [],
+                      "keywords": [
+                        "mysqladmin",
+                        "shell"
+                      ],
                       "children": [],
                       "keywords_must": [],
                       "keywords_forbid": []
@@ -305,7 +308,11 @@
                   {
                     "myisampack": {
                       "node_id": "mysql-b34e3244a8ba4166bd22bc4fe5f7d8db",
-                      "keywords": [],
+                      "keywords": [
+                        "myisampack",
+                        "myisam",
+                        "pack"
+                      ],
                       "children": [],
                       "keywords_must": [],
                       "keywords_forbid": []
@@ -314,7 +321,11 @@
                   {
                     "mysqlbinlog": {
                       "node_id": "mysql-fe9caf0e07a94efc8b7c8f2a4c683efe",
-                      "keywords": [],
+                      "keywords": [
+                        "mysqlbinlog",
+                        "binlog",
+                        "二进制日志"
+                      ],
                       "children": [],
                       "keywords_must": [],
                       "keywords_forbid": []
@@ -359,7 +370,12 @@
                   {
                     "mysqlimport": {
                       "node_id": "mysql-e782e10839d843c0ad36a05ae7d0366f",
-                      "keywords": [],
+                      "keywords": [
+                        "mysqlimport",
+                        "import",
+                        "restore",
+                        "导入"
+                      ],
                       "children": [],
                       "keywords_must": [],
                       "keywords_forbid": []
@@ -438,16 +454,13 @@
                   },
                   {
                     "存储过程和函数": {
-                      "node_id": "mysql-a6b27f219f3c47c981ed1dceffa8a1a6",
+                      "node_id": "mysql-98e926730d844f238dc9cd8ac5f65126",
                       "keywords": [
-                        "函数",
+                        "produce",
                         "function"
                       ],
                       "children": [],
-                      "keywords_must": [
-                        "函数",
-                        "function"
-                      ],
+                      "keywords_must": [],
                       "keywords_forbid": []
                     }
                   },
diff --git a/gears/sql/employee.sql b/gears/sql/employee.sql
new file mode 100644
index 0000000000000000000000000000000000000000..3fe430978a025907d5eab4a30a00c495e7467d1e
--- /dev/null
+++ b/gears/sql/employee.sql
@@ -0,0 +1,7 @@
+create table employee
+(
+    id     serial primary key,
+    name   varchar(256),
+    dept   varchar(256),
+    salary decimal(12, 4)
+);
\ No newline at end of file
diff --git a/gears/sql/sales.sql b/gears/sql/sales.sql
new file mode 100644
index 0000000000000000000000000000000000000000..958ed53e79ddbf8d11d2f2ce6b41e9bd923ae990
--- /dev/null
+++ b/gears/sql/sales.sql
@@ -0,0 +1,7 @@
+create table sales(
+                      id serial primary key ,
+                      sku_id integer not null ,
+                      amount decimal(12, 4),
+                      created_at timestamp default now()
+);
+create index idx_created_at on sales(created_at);
\ No newline at end of file