From 5a8622150a02f75d98c18f13b2ace98a87ee2114 Mon Sep 17 00:00:00 2001 From: X <1493028933@qq.com> Date: Mon, 19 Feb 2024 07:55:59 +0000 Subject: [PATCH] =?UTF-8?q?update=2012.=E8=8E=B7=E5=8F=96=E6=89=80?= =?UTF-8?q?=E6=9C=89=E9=83=A8=E9=97=A8=E4=B8=AD=E5=BD=93=E5=89=8D=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E8=96=AA=E6=B0=B4=E6=9C=80=E9=AB=98=E7=9A=84=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BF=A1=E6=81=AF.md.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: X. <1493028933@qq.com> --- ...232\204\347\233\270\345\205\263\344\277\241\346\201\257.md" | 3 +++ 1 file changed, 3 insertions(+) diff --git "a/12.\350\216\267\345\217\226\346\211\200\346\234\211\351\203\250\351\227\250\344\270\255\345\275\223\345\211\215\345\221\230\345\267\245\350\226\252\346\260\264\346\234\200\351\253\230\347\232\204\347\233\270\345\205\263\344\277\241\346\201\257.md" "b/12.\350\216\267\345\217\226\346\211\200\346\234\211\351\203\250\351\227\250\344\270\255\345\275\223\345\211\215\345\221\230\345\267\245\350\226\252\346\260\264\346\234\200\351\253\230\347\232\204\347\233\270\345\205\263\344\277\241\346\201\257.md" index a19c54b..8650e9f 100644 --- "a/12.\350\216\267\345\217\226\346\211\200\346\234\211\351\203\250\351\227\250\344\270\255\345\275\223\345\211\215\345\221\230\345\267\245\350\226\252\346\260\264\346\234\200\351\253\230\347\232\204\347\233\270\345\205\263\344\277\241\346\201\257.md" +++ "b/12.\350\216\267\345\217\226\346\211\200\346\234\211\351\203\250\351\227\250\344\270\255\345\275\223\345\211\215\345\221\230\345\267\245\350\226\252\346\260\264\346\234\200\351\253\230\347\232\204\347\233\270\345\205\263\344\277\241\346\201\257.md" @@ -27,3 +27,6 @@ select dept_no,s.emp_no,max(salary) salary from dept_emp de left join salaries s ## 题解 +select a.dept_no as '部门编号',a.emp_no as '员工编号', max(a.salary) as '薪资' +from (select dp.dept_no,dp.emp_no,SS.salary from dept_emp dp left join salaries ss on dp.emp_no = ss.emp_no where dp.to_date = '9999-01-01' and ss.to_date = '9999-01-01' ) a +group by a.dept_no \ No newline at end of file -- Gitee