Variation on greatest-n-per-group where whole table is needed with indicator, not just greatest rows per group
Use a window function:
SELECT ROW_NUMBER() OVER (PARTITION BY repid ORDER BY date DESC) = 1 AS greatest, ...

This requires MySQL 8.0.02 or MariaDB 10.2.0 to use window functions.