I have a simple relation "sea" with only two columns, one is called "name" and the other "depth". With the following command, I can output the number maximum number in the attribute depth:
SELECT max(depth) FROM sea;
I am trying to get the the name of the maximum depth as well, such that it outputs:
name | depth
___________________
pacific | 11034
Is there a way to output that as well?
I have tried it with group by and also by trying to JOIN the table with itself receiving the other attributes, that did not find any solution.