Find top Nth employee from each department in terms of
salary?
Answers were Sorted based on User's Feedback
Answer / khushboo
select top 1 emp_name,emp_sal from employee order by emp_sal
desc
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / madhu
select top 1 salary,employee from (table name) group by
department
| Is This Answer Correct ? | 10 Yes | 13 No |
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 |
What are relationships and mention different types of relationships in the dbms
How extra digits are handled with numeric data type literals?
How to stop log file growing too big?
What is the log shipping?
Where can you add custom error messages to sql server?
Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security
Tell me what is the order in which the sql query is executed?
What is an extended stored procedure? Can you instantiate a COM object by using T-SQL?
What is a select query statement in ms sql server?
What are statistics?
What is a view in sql?
What is executereader?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)