sort, sum and join tables
sort, average, and blah