哪个高手帮我看看这个答案对不对啊。。。有错的帮忙改下呗》》
1)查询出该单位共有几个部门。selectdept_id,count(*)as门数fromDepartments2)统计出每个部门的人数,按部门名称和人数两selectd...
1)查询出该单位共有几个部门。
select dept_id,count(*) as 门数 from Departments
2)统计出每个部门的人数,按部门名称和人数两
select dept_name,count(dept_id) as人数
from Departments jion Employees
on Departments.dept_id=Employees.dept_id group by dept_name
3)显示出职工工资总额多于100000的部门号。
select dept_id,sum(emp_salary) from Employees
group by dept_id having count(emp_salary)>100000 展开
select dept_id,count(*) as 门数 from Departments
2)统计出每个部门的人数,按部门名称和人数两
select dept_name,count(dept_id) as人数
from Departments jion Employees
on Departments.dept_id=Employees.dept_id group by dept_name
3)显示出职工工资总额多于100000的部门号。
select dept_id,sum(emp_salary) from Employees
group by dept_id having count(emp_salary)>100000 展开
3个回答
展开全部
1)查询出该单位共有几个部门。
Investigate how many departaments a company has.
2)统计出每个部门的人数,按部门名称和人数两
Count the total number of people in each department according to title of departments and number of people.
3)显示出职工工资总额多于100000的部门号。
Demonstrate the department with more than 100,000 dollars of employee salary.
是这样吗?
Investigate how many departaments a company has.
2)统计出每个部门的人数,按部门名称和人数两
Count the total number of people in each department according to title of departments and number of people.
3)显示出职工工资总额多于100000的部门号。
Demonstrate the department with more than 100,000 dollars of employee salary.
是这样吗?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询