wrap event dates in MIN in queries when GROUP BY is present - updates #30314