数据库 SQL语句
发布网友
发布时间:2022-04-08 19:39
我来回答
共4个回答
热心网友
时间:2022-04-08 21:09
参考下:
1.select employee_name from employee where employee_name not in(select manager_name
from manages) and street in (select street from employee join manages on
employee.employee_name=manages.employee_name)
and city in (select city from employee join manages on
employee.employee_name=manages.employee_name)
2.select top 1 company_Name,sum(salary) from work group by company_name order by
sum(salary)
3.select employee_name from work join
(select Company_name,avg(salary) as avg_salary from work group by company_name)
tb on work.company_name=tb.company_name
where work.salary>avg_salary
热心网友
时间:2022-04-08 22:27
1.select e.* form employee e,employee e1,manages m
where e1.employee_name=m.manager_name and e1.city=e.city and e.employee_name=m.employee_name
2.select *
from company
where company_name=
(select company_name from works where min(sum(salary))
3.select *
from employee
where salary>avg(salary)
热心网友
时间:2022-04-09 00:01
1,
SELECT *
FROM EMPLOYEE
WHERE STREET,CITY =
(SELECT STREET,CITY
FROM EMPLOYEE,MANAGES
WHERE MANAGES.EMPLOYEE_NAME = EMPLOYEE.NAME)
2,(问得就有问题)
SELECT COMPANY_NAME,SUM(SALARY)
FROM WORKS
GROUP BY COMPANY_NAME
3,
建议自己写存储过程解决
热心网友
时间:2022-04-09 01:53
1.select e.* form employee e,employee e1,manages m
where e1.employee_nanme=m.manager_name and e1.city=e.city and e.employee_name=m.employee_name
2.select company_name,sum(salary)
from works
group by company_name