Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Find top Nth employee from each department in terms of
salary?

Answers were Sorted based on User's Feedback



Find top Nth employee from each department in terms of salary?..

Answer / khushboo

select top 1 emp_name,emp_sal from employee order by emp_sal
desc

Is This Answer Correct ?    0 Yes 2 No

Find top Nth employee from each department in terms of salary?..

Answer / madhu

select top 1 salary,employee from (table name) group by
department

Is This Answer Correct ?    10 Yes 13 No

Find top Nth employee from each department in terms of salary?..

Answer / 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

More SQL Server Interview Questions

What is the difference between Temporary table variable and a Table variable? Or Which Table variable I should use inside Stored procedure?

3 Answers   Microsoft, TCS, Techastrum,


Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.

0 Answers  


Can we write a distributed query and get some data which is located on other server and oracle database?

0 Answers  


What is an sql server agent?

0 Answers  


Can we use where clause with group by?

0 Answers  


Explain how to integrate the ssrs reports in application?

0 Answers  


what is physical sort data and logical sort data in index?

2 Answers  


What is the difference between a function and a trigger?

0 Answers  


Explain what is meant by replication of database?

0 Answers   Cap Gemini,


Why use stored procedures in sql server?

0 Answers  


What is a dbms wizard?

0 Answers  


How many index can be created for single table

4 Answers   CarrizalSoft Technologies, Verizon,


Categories