Check out example codes for "mysql find the row ites of the hoghest value at on column". It will help you in understanding the concepts better.

Code Example 1

SELECT tt.*
FROM topten tt
INNER JOIN
    (SELECT home, MAX(datetime) AS MaxDateTime
    FROM topten
    GROUP BY home) groupedtt 
ON tt.home = groupedtt.home 
AND tt.datetime = groupedtt.MaxDateTime

Learn ReactJs, React Native from akashmittal.com