Is there a simple way to find the second largest or smallest number in a group of columns of a table?
I can easily find the largest or smallest by using select min
/max (a, b, c, d) by i from t
.
However I can't seem to figure out a simple way to find the second (or third) largest or smallest from the group.
Thanks