Write a SQL query selecting the newest event per account, including a deterministic tie-break on event id.