I have a table with 4 columns. ID is a unique number , you can have the same id_number with different update_dates. In the current table all FLAGS are set to 'Y', however what i want to do is set the FLAG to 'Y' only for the max update_date for each ID/ else N. any unique ID that has a count > 1 i should look to see the max update_date and flag that with a 'Y' the else 'N' for (historical purposes).
I need an update statement that will update the FLAG in my existing tables based off the update_date.
06-21-18 is flagged 'Y' since its the most recent update_date