2,507
社区成员




select 员工号 from t a
where not exists(select 1 from t where a.部门代号=部门代号 and 工资>a.工资)
select 员工号,a.工资,a.部门代号
from 工资表 as a,
(select max(工资) as 工资,部门代号
from 工资表
group by 部门代号) as b
where a.工资=b.工资 and a.部门代号=b.部门代号
select 员工号,a.工资,a.部门代号
from 工资表 as a,
(select max(工资) as 工资,部门代号
from 工资表) as b
where a.工资=b.工资 and a.部门代号=b.部门代号
select 员工号, max(工资)as '工资' ,部门代号
from t
group by 员工号,部门代号