Answer Posted / prakash.matte
if we want to make use of nested query instead of the above,
try the following
select max(column_name) from table_name where column_name =
(select
max(column_name)-(highest_salary_number_for_calculation -1)
from blocks where bid);
Example :
For second highest salary:
select max(bid) from blocks where bid = (select max(bid)-1
from blocks);
For third highest salary:
select max(bid) from blocks where bid = (select max(bid)-2
from blocks);
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
How is it possible to know the number of rows returned in result set?
What websites use php?
What is the scope of a variable defined outside a function?
How does the identity operator === compare two values?
What is the purpose of the php empty function?
Tell me how to strip whitespace (or other characters) from the beginning and end of a string?
What is php explain how php works?
what is benefit of magento?
Does php support multithreading?
What is super keyword in php?
What is an operator in php?
List some sorting functions in php?
Is php fully object oriented?
How to get the directory name out of a file path name?
Why json is used in php?