I would like to know how I can query MySQL so that entries that have the same ID, to check and see which of the entries with the same ID has the highest value, and then return that value. In the end, I need it to return all unique IDs with the value, and if there are nonunique IDs, to make it pick the one with the highest value.
Example table and return values in the image below…

Swift help would be greatly appreciated!
Here is what I have so far, I dont know what conditions to put
‘SELECT CONCAT(table.ID, “\t”, table.value) INTO OUTFILE …’
Using concat: