Purchase Solution

SQL query to find the second highest income/salary

Not what you're looking for?

Ask Custom Question

Write a query to find the second highest income/salary.

Table: Income
Emp_id Emp_name Dept Salary
1 Anthony Gonzales Finance 100,000
2 Timothy Dalton IT 94,000
3 Maria D'souza Msci 79,000
4 Monica Lee Clent Services 150,000
5 Umesh Shah Engg 125,000
6 John Reginald AppDev 73,000

Purchase this Solution

Solution Summary

The solution contains an SQL query (tested in Microsoft SQL Server) to find the second highest salary value. It could be used to find in general any second largest column value in a table.

Solution Preview

The query to find the second highest income/salary can be written as below:

Select * from Income a
where 2=(select count(*) from ...

Purchase this Solution


Free BrainMass Quizzes
Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic Networking Questions

This quiz consists of some basic networking questions.

C++ Operators

This quiz tests a student's knowledge about C++ operators.