I have this table:
first_name | last_name | age | country |
---|---|---|---|
John | Doe | 31 | USA |
Robert | Luna | 22 | USA |
David | Robinson | 22 | UK |
John | Reinhardt | 25 | UK |
Betty | Doe | 28 | UAE |
How can I get only the names of the oldest per country?
When I do this query
SELECT first_name,last_name, MAX(age)
FROM Customers
GROUP BY country
I get this result:
first_name | last_name | MAX(age) |
---|---|---|
Betty | Doe | 31 |
John | Reinhardt | 22 |
John | Doe | 31 |
But I want to get only first name and last name without the aggregate function.