I have a mySQL database to store position information of bikes. For the 'last position' method I want to get only the last entry of a bike but from all bikes.
Example:
ID | ## LAT ## | ## LNG ## | #### TIMESTAMP #### | BIKE_ID
----------------------------------------------------------
16 | N47.68526 | E16.59032 | 2015-01-12 14:49:51 | 3
17 | N47.36345 | E16.12096 | 2015-01-12 14:50:27 | 9
18 | N44.12526 | E15.12562 | 2015-01-12 14:51:45 | 1
19 | N47.87654 | E16.54323 | 2015-01-12 14:51:51 | 3
20 | N47.12345 | E16.12341 | 2015-01-12 14:52:27 | 1
21 | N47.12531 | E15.12561 | 2015-01-12 14:52:45 | 9
22 | N44.12531 | E16.12561 | 2015-01-12 14:53:01 | 1
23 | N47.12531 | E15.12561 | 2015-01-12 14:53:18 | 9
...
I want an output like:
ID | ## LAT ## | ## LNG ## | #### TIMESTAMP #### | BIKE_ID
----------------------------------------------------------
19 | N47.87654 | E16.54323 | 2015-01-12 14:51:51 | 3
22 | N44.12531 | E16.12561 | 2015-01-12 14:53:01 | 1
23 | N47.12531 | E15.12561 | 2015-01-12 14:53:18 | 9