Check out example codes for "second height salary mysql". It will help you in understanding the concepts better.

Code Example 1

Both options you find max as a subset and then exclude from main select
sql> SELECT MAX( col ) FROM table
 	WHERE col < ( SELECT MAX( col ) FROM table);
sql> SELECT MAX(col) FROM table 
WHERE col NOT IN (SELECT MAX(col) FROM table);

Learn ReactJs, React Native from