Add sorting by creation date to query.