1. 按名字查找
Select * from yuangong where name=’’;
2. 按薪水大於1000查找
Select * from yuangong where salary>1000;
3. 部門人數
Select dept_id,count(*) as total from yuangong group by dept_id;
4. 部門平均薪資
Select dept_id,avg(salary) from yuangong group by dept_id;
5. 描述爲空的
Select * from yuangong where description is null;
6. 每個部門女員工薪水最大值
Select dept_id,max(salary) from yuangong where gende='f' group by dept_id having ;
7. 名字以l開頭的
Select * from yuangong where name like ‘l%’;