I want to get the top disposition of every ID where 1 is the lowest and 13 is the highest, however when there are IDs with similar disposition (e.g. ID #2 having multiple dispositions of '9') I cannot get the record with the latest time / timestamp.
How can I group the results by ID getting the maximum disposition and if there are multiple disposition, get the most recent? (e.g. ID #2 getting '2017-04-06 14:16:00' as the top or max.)
edit: I forgot to mention that I also need to group them by date. I have a separate column for date. The expected output is: Latest + Highest dispo of ID #2 on April 6 and Latest + Highest dispo of ID#2 on April 7 and so forth.