Hi friends,In this article i have explained how to find max salary from different department.
First create a table in database .
Enter some data in the table with different department .
Example:
create table m_salary(empid varchar(50),empname varchar(50),salary varchar(50),deptid varchar(50))
First create a table in database .
Enter some data in the table with different department .
Example:
create table m_salary(empid varchar(50),empname varchar(50),salary varchar(50),deptid varchar(50))
Enter some values in the table.
Sql query :
select deptid , MAX(salary) as sal from m_salary group by deptid ;
Run this query and I hope this will help you.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.