Check out example codes for "SQL get max per id". It will help you in understanding the concepts better.

Code Example 1

select name, max(value)
from out_pumptable
group by name

Learn ReactJs, React Native from akashmittal.com