Answer
This strongly suggests the date column is actually stored as a text/VARCHAR2 string rather than a genuine DATE type, meaning MAX() (and any comparison/sorting) is being evaluated as a string comparison rather than a true chronological comparison — which can produce results that look wrong for dates written in inconsistent or non-lexicographically-sortable text formats. Convert the column explicitly with TO_DATE(activity_date, '<matching format mask>') inside the MAX() aggregation, and ideally have the underlying column genuinely typed as DATE rather than text going forward, to get correct chronological aggregation instead of a misleading string-based one.