Add an index on the max dates table.
Remove unneeded columns from final export.

Remove updated date, x and y.