I am selecting two fields, 'name' and 'address' from a table of multiple entries. Each record is a home address belonging to each name. A new record is created every time an address is changed and all I need to do is generate a list of names and their latest addresses.
To do this I am selecting name and address grouped by name, which gets me a list of names and addresses. But how can I ensure that the address returned is the latest? There is a date field that I can use but I'm not sure how to sort and group at the same time.