请问我这样为什么不对呢? select g1.dept_no,g1.dept_name,g1.title,count(g1.title)as count from (select de2.emp_no,de2.dept_no,tt.title from dept_emp as de2 join titles as tt on de2.emp_no=tt.emp_no where de2.to_date=tt.to_date='9999-01-01') as g1 join (select de1.dept_no,de1.dept_name,de2.emp_no from departments as de1 join dept_emp as de2 on de1.dept_no=de2.dept_no where de2.to_date='9999-01-01') as g2 on g1.emp_no=g2.emp_no group by g1.dept_no,g1.title
点赞

相关推荐

在评审的大师兄很完美:像这种一般就是部门不匹配 转移至其他部门然后挂掉 我就是这样被挂了
点赞 评论 收藏
分享
牛客网
牛客企业服务