Quote:
Originally Posted by ruby
I have a table - Trade with 2 columns -Client name and quantity.
I want to find out the name of the client with second highest quantity. How do I proceed?
|
[sql]select quantity from trade a where 2=(select count(quantity) from trade b where a.quantity<=b.quantity);[/sql]
-hello friend this query is called nested sub query this is the only way to find the values in given count order