Adding lastEventDate to query