CREATE TABLE phone_market (Market_ID NUMBER, Phone_ID CLOB, Num_of_stock NUMBER)
CREATE TABLE market (Market_ID NUMBER, District CLOB, Num_of_employees NUMBER, Num_of_shops FLOAT, Ranking NUMBER)
CREATE TABLE phone (Name CLOB, Phone_ID NUMBER, Memory_in_G NUMBER, Carrier CLOB, Price FLOAT)

For each phone, show its names and total number of stocks Visualize by bar chart, and rank num of stock in descending order.
SELECT Name, SUM(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name ORDER BY SUM(T1.Num_of_stock) DESC
SELECT "Name", SUM("T1"."Num_of_stock") FROM "phone_market" "T1" JOIN "phone" "T2" ON "T1"."Phone_ID" = "T2"."Phone_ID" GROUP BY "T2"."Name" ORDER BY SUM("T1"."Num_of_stock") DESC