Get second smallest number(s) in sql column
I currently have the code below and it works for getting me the 2 smallest
number, but I want to get all of the 2nd smallest numbers and link them to
their name as opposed to just one of them. lets say the numbers in the
tables was made up of this:
Name| number
----|------
w 2
a 8
s 2
e 2
I would want to get
w 2
s 2
e 2
and now I am just getting w 2 select name, gunsize from ships order by
gunsize desc limit 1,1
No comments:
Post a Comment