id value created_at
1 55 2018-07-16
2 25 2018-07-16
3 50 2018-07-16
1 100 2018-07-16
1 5 2018-07-16
3 11 2018-07-16
4 6 2018-07-16
How can I bring back each id (1, 2, 3, 4) but only the highest value record of each in an array?
1 = 100, 2 = 25, 3 = 50, 4 = 6