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 |
2) Consider a Table name A which has below records ID --- 5 5 5 5 5 Consider another table B which has below records ID -- 5 5 5 5 5 5 5 5 How many rows will be returned by each of the below queries a) select * from A inner join B on A.id = b.ID b) select * from A left join B on A.id = b.ID c) select * from A right join B on A.id = b.ID
Write an sql query to find the names of employees start with ‘a’?
Explain the advantages of merge replication?
If a stored procedure is taking a table data type, how it looks?
what is mean by crystal repoart? ahere we will mainly use that?
How do I create a stored procedure in dbml?
Who developed sql server?
How to integrate the ssrs reports in application?
When we should use @@error?
How to recompile stored procedure at run time?
Can you explain what are commit and rollback in sql?
Explain cdc and sql injection?
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)