# 最小值练习
Joe 想要得到 employee 表
```sql
create table employee
(
id serial primary key,
name varchar(256),
dept varchar(256),
salary decimal(12, 4)
);
```
中每个部门工资最低的员工的工资信息,这条查询应该怎么写?
点击进入[MySQL实战练习环境](https://mydev.csdn.net/product/pod/new?image=cimg-centos7-skilltreemysql&connect=auto&create=auto&utm_source=skill){target="_blank"}。
* `show databases;` 列出所有数据库
* `show tables;` 列出所有表
## 答案
```sql
select dept, min(salary) from employee group by dept;
```
## 选项
### A
```sql
select dept, min(salary) from employee;
```
### B
```sql
select dept, min(salary) from employee;
```
### C
```sql
select dept, min(salary) from employee;
```
### D
```sql
select dept, min(total) from employee;
```