export by max id