永发信息网

江湖救急!!! 急求SQL高手帮忙两道问题!!!

答案:1  悬赏:0  手机版
解决时间 2021-11-10 18:24
  • 提问者网友:辞取
  • 2021-11-09 20:19
江湖救急!!! 急求SQL高手帮忙两道问题!!!
最佳答案
  • 五星知识达人网友:末日狂欢
  • 2021-11-09 20:43
select dNumber, dName, count(*)
from Department, Employee
where dNumber=dNo and salary>40000 and dNumber in(select dNo from Employee group by dNo having count(*)>5)

select pNumber, pName, SSN, eName
from Project, WorksOn, Employee
where pNumber=pNo and eSSN=SSN and eSSN in
(select eSSN from WorksOn T1, (select pNo, max(hours) maxhours from WorksOn group by pNo) T2
where T1.pNo=T2.Pno and T1.hours-T2.maxhours )
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯