提交 4fdd7aec 编写于 作者: L luxin

bug fixed for exercises

上级 2b484d2f
...@@ -34,23 +34,17 @@ select sum(total) from orders where deal and unit_price > 1000; ...@@ -34,23 +34,17 @@ select sum(total) from orders where deal and unit_price > 1000;
### A ### A
```sql
select sum(total) from orders where deal and unit_price > 1000;
```
### B
```sql ```sql
select sum(total) from orders having deal and unit_price > 1000; select sum(total) from orders having deal and unit_price > 1000;
``` ```
### C ### B
```sql ```sql
select sum(total) from orders group by deal having unit_price > 1000; select sum(total) from orders group by deal having unit_price > 1000;
``` ```
### D ### C
```sql ```sql
select sum(total) from orders having deal and unit_price > 1000; select sum(total) from orders having deal and unit_price > 1000;
......
...@@ -38,17 +38,11 @@ select dept, min(salary) from employee; ...@@ -38,17 +38,11 @@ select dept, min(salary) from employee;
### B ### B
```sql ```sql
select dept, min(salary) from employee; select dept, min(salary) from employee order by dept;
``` ```
### C ### C
```sql
select dept, min(salary) from employee;
```
### D
```sql ```sql
select dept, min(total) from employee; select dept, min(total) from employee;
``` ```
\ No newline at end of file
...@@ -38,17 +38,11 @@ select dept, avg(salary) from employee; ...@@ -38,17 +38,11 @@ select dept, avg(salary) from employee;
### B ### B
```sql ```sql
select dept, avg(salary) from employee; select dept, avg(dept) from employee group by dept;
``` ```
### C ### C
```sql ```sql
select dept, avg(salary) from employee; select dept, avg(salary) from employee group by salary;
```
### D
```sql
select dept, avg(salary) from employee ;
``` ```
...@@ -41,7 +41,7 @@ create unique index idx_goods_category on goods(category_id); ...@@ -41,7 +41,7 @@ create unique index idx_goods_category on goods(category_id);
### B ### B
```sql ```sql
create index idx_goods_category on goods(category_id); create index idx_goods_category on goods(name);
``` ```
### C ### C
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册