According to the tables:
USERS (user_name, email, balance)
How can I create a query that return the second highest user balance in the most efficient way ?
I successes to get this record (but not by the efficient way) with the query:
SELECT
*
FROM
(SELECT
us.*,
ROWNUM row_num
FROM
(SELECT
u.*
FROM
users u
ORDER BY
u.BALANCE DESC) us
WHERE
ROWNUM < 3)
WHERE
row_num > 1;