select a_code, s_code, avg(sales) from clerk group by a_code, s_code order by avg(sales) desc ;