- 1
how to find 2nd largest number
3 Respostas
0
SELECT num
FROM table
WHERE id= ( SELECT id
FROM table
WHERE num = num-1
ORDER BY num DESC)
Here num is a column where different number value are stored.
- 1
You can find the second largest value of column by using the following query:
SELECT *
FROM TableName a
Where
2 = (SELECT count(DISTINCT(b.ColumnName))
FROM TableName b WHERE
a.ColumnName <= b.ColumnName);
- 1
what 2?