For example:
x
name | weight
jon 100
jane 120
joe 130
How do I only return the name of the person with the largest weight?
Advertisement
Answer
Use this:
select name
from tbl
where weight = (select max(weight) from tbl)
For example:
name | weight
jon 100
jane 120
joe 130
How do I only return the name of the person with the largest weight?
Use this:
select name
from tbl
where weight = (select max(weight) from tbl)