I think you could do this using a common table expression, where you could order, aggregate, and enumerate your data with row_number() or another ranking function, depending on how you want ties within your data handled. You could then directly update the data within the table expression matching on ID, and filtering on NULLs and row numbers being greater than one, assuming data with a row number of 1 has the "max" value when ordered by ID and date location was obtained, descending.