choose max value mysql code example
Example 1: mysql find max value row
SELECT t1.*
FROM employees t1
INNER JOIN (
SELECT id, max(salary) AS salary FROM employees GROUP BY id
) t2 ON t1.id = t2.id AND t1.salary = t2.salary;
Example 2: mysql max()
USE world;
SELECT MAX(Population) AS 'Maximum Value'
FROM City
WHERE CountryCode = 'THA';