I'm trying to retrieve a list of results where there are multiple rows which have a duplicate field in different rows but only want to retrieve the row which has been created most recently
Data
loc | created | dest | w | l | h
--------------------------------------------------------------------
2 | 2020/11/09 07:00:00 | north | 12 | 10 | 34
3 | 2020/11/09 07:10:00 | south | 34 | 67 | 23
3 | 2020/11/09 08:13:00 | west | 67 | 22 | 12
I have tried the the following which does give me the rows I require but is missing the extra columns which I require.
Select loc, MAX(created)
from Data
Group By loc
Results Required
loc | created | dest | w | l | h
--------------------------------------------------------------------
2 | 2020/11/09 07:00:00 | north | 12 | 10 | 34
3 | 2020/11/09 08:13:00 | west | 67 | 22 | 12