instruction: For those records from the products and each product's manufacturer, return a bar chart about the distribution of headquarter and the average of code , and group by attribute headquarter, I want to show the average of code in descending order.
response: SELECT T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T1.Code DESC