I have an SQL table and I made an SQL query which orders by latest update and groups by fleetID afterwards.
The table is in this image:

The query should return lines 3 and 5 but mine returns 1 and 3. My query is:
SELECT * FROM ( SELECT * from test order by lastupdate )l group by l.fleetid
 
     
    