Skip to content

Day 4: oh lokinho meu #1

@mahtues

Description

@mahtues
select d.Name as Department, b.Name as Employee, b.Salary as Salary
from (
    select max(Salary) as Salary, DepartmentId as DepartmentId
    from Employee
    group by DepartmentId) as a
inner join Employee as b
on (a.Salary = b.Salary and a.DepartmentId = b.DepartmentId)
inner join Department as d
on (d.Id = a.DepartmentId);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions