Find top Nth employee from each department in terms of
salary?
Answer Posted / suri
select max(m.total_amt),e.emp_name, d.dept_name from
hr_employee_salary_mst m,
hr_employee_mst e, hr_dept_table d
where d.dept_id=e.dept_id
and m.employee_id=e.emp_id
group by d.dept_name,e.emp_name,d.dept_name
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
What is difference between delete & truncate commands?
How can you transfer data from a text file to a database table? Or how can you export data from a table to a comma delimited (csv) file? Or how can you import data from ms access to a table in a database? Or how can you export data from a table to an excel file?
Why truncate is ddl command?
What are the different types of columns types constraints in the sql server?
what are the different stages of Report Processing?
What are the types of database recovery models?
Do you know spatial data types - geometry and geography in sql server 2008?
how to create a scrollable cursor with the scroll option? : Sql server database administration
How to find a value in another dataset based on current dataset field (ssrs 2008 r2)?
how many bits ip address consist of? : Sql server database administration
Explain system rowset functions?
How do you send email on SQL Server?
What are sql azure firewall rules?
What is the difference between a check constraint and a rule?
what are user defined datatypes and when you should go for them? : Sql server database administration