So I have one table
Table_A
ID    Code       Arrival date
3      A3           3/1/15
2      A2           1/1/15
1      A3           2/1/15
ID is auto increment, arrival date can be the same of the same code,
So what I want my MySQL query to do is to group all those codes with arrival date fits a range of dates and group them by code then choose only the latest input
What I have so far
Select * from Table_A
Where 'Arrival date' between 1/1/15 and 3/1/15 and group by Code
But somehow this only return the earliest code, how I can solve this?
 
     
    