When grouping records, the record chosen can sometimes between arbitrary. See for instance https://wp-event-organiser.com/forums/topic/wrong-date-for-next-event-showing-in-archive-group-by-series/ and https://stackoverflow.com/questions/12102200/get-records-with-max-value-for-each-group-of-grouped-sql-results The solution as detailed in the second link is to JOIN the table with itself rather than using GROUP BY.