CREATE TABLE Products (Code NUMBER, Name VARCHAR2, Price NUMBER, Manufacturer NUMBER)
CREATE TABLE Manufacturers (Code NUMBER, Name VARCHAR2, Headquarter VARCHAR2, Founder VARCHAR2, Revenue FLOAT)

For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the average of code , and group by attribute headquarter, could you rank by the bars from high to low please?
SELECT T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T2.Headquarter DESC
SELECT "T2"."Headquarter", "T1"."Code" FROM "Products" "T1" JOIN "Manufacturers" "T2" ON "T1"."Manufacturer" = "T2"."Code" GROUP BY "T2"."Headquarter" ORDER BY "T2"."Headquarter" DESC