For example, I got a table:
Name  , Area,   Age
cat   ,   1 ,    10
dog   ,   2 ,     7
cat   ,   3 ,    11
horse ,   4 ,     4
cat   ,   5 ,    10
dog   ,   6 ,     9
When I group by 'Name', for each group I want to retain the 'Area' of the MAX 'Age' in that group. In this example, I wanna get:
Name , Area
cat  ,  3
dog  ,  6
horse,  4
How should I do this in one query? Thanks guys!
 
     
     
    