I have the following table
Table structure:
CREATE TABLE IF NOT EXISTS `people` (
`name` varchar(10) NOT NULL,
`age` smallint(5) u
MAX is an aggregate function. That means MySQL groups all of the records and treats them as if they were one in the result set. Since you doesn't state how the name column is to be grouped, the result of that may be unexpected. ORDER BY is a perfectly fine way to achieve the desired result. Just don't forget to add an index on age so the performance isn't affected as the table grows.