So I've been trying to find an answer on here that will work for my situation, but I am having a bit of a problem finding one. Basically, I have a table comprising 10,000 rows or more and there are some things that repeat in the table. For example, I have 3 units and they each have a unit_id that is repeating. These units also have a long/lat associated with them. How would I go about selecting the most recent long/lat of each unique device?
entry_id | unit_id | lat | long
1         123       45     62
2         123       15     24 
3         123       12     11
4         456       55     31
5         456       01     12
6         123       15     46
The higher the entry_id, the newer the entry. So in this example I would want to select entries 5 and 6 so that I have the most recent lat/long for these devices. Any ideas?
 
     
     
    