fbpx

Find the Second Highest Value

Here’s another interesting SQL question. This problem can be easily solved by using Analytic Functions, or programming capabilities. The challenge is to solve this question with a simple SQL SELECT statement.

Given the following Numbers table. As you can see, this table has one column (named number) with values in the range of 10 to 29. Create a query to display the second highest value in that table (in our case 27).

 

image


 

UpScale Analytics is one of the largest platforms in the world for learning SQL by doing, consisting over 300 SQL exercises at different levels (including solutions), by topics, across over 100 different datasets. More…