Fix orderby for affiliate earnings