sorting on the proceeds table