What software are you using? If you are using EXCEL, it's simple to select the column,
and then click 'Data' as 'SORT' and choose 'Descending', and then to pick the 3rd row in the ordered column.
> I want a SQL query for this working on Oracle.
Your _first_ posting should have specified that.
Use the 'TOP' modifier to select the "top-three". Then, use the 'MINIMUM' modifier to select the smallest of the top three.
The exact SQL syntax is left as an exercise for the reader.
top is not wrkng in oracle
Reference: http://www.quackit.com/sql/tutorial/sql_...
In the preceeding [sic] lessons on the SELECT statement, the examples have returned all records that have matched our SELECT criteria. This is great if you want to look at every record, but, what if you only want to look at the first few records?
Sounds like you need the SQL TOP clause.
The TOP clause allows us to specify how many rows to return.
This can be useful on very large tables when there are thousands of records.
Returning thousands of records can impact on performance, and if you are working with a production database, this could have an adverse impact on the users.
Note: The SQL TOP clause is Transact-SQL, and not part of ANSI SQL.
Therefore, depending on your database system, you may not be able to use this clause.
-----------------------------------------
So, talk to your local Oracle/SQL guru.
×
152 views
Usually answered in minutes!
i want a sql query for this working on oracle
×