We have tow tables Employee and Department, Now we have a question to find the max salary according to department location.
Description
I created a two table like below
Employee table
Department table
Dummy Data
Now SQL query using join
select Department.Location,MAX(Salary) as Salary from Employee left join Department on Employee.DeptId=Department.DeptId group by Department.Location
Description
I created a two table like below
Employee table
Dummy Data
Department table
Dummy Data
Now SQL query using join
select Department.Location,MAX(Salary) as Salary from Employee left join Department on Employee.DeptId=Department.DeptId group by Department.Location
Output
No comments:
Post a Comment