I have the following table
Table structure:
CREATE TABLE IF NOT EXISTS `people` (
`name` varchar(10) NOT NULL,
`age` smallint(5) u
There is an interesting alternative that works only on MySql!
SELECT `Name`, `Age` FROM
(SELECT `Name`, `Age`, 1 AS `foo`
FROM `People`
ORDER BY `Age` DESC) AS `x`
GROUP BY `foo`
This works because MySql returns the first row, when no aggregation function is applied on a given column
Here is the link: http://tominology.blogspot.com.br/2014/10/sql-row-with-max-value.html