CREATE TABLE phone (name CLOB, phone_id NUMBER, memory_in_g NUMBER, carrier CLOB, price NUMBER)
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 NUMBER, ranking NUMBER)

For each phone, show its names and total number of stocks.
SELECT T2.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
SELECT "T2"."name", SUM("T1"."num_of_stock") FROM "phone_market" "T1" JOIN "phone" "T2" ON "T1"."phone_id" = "T2"."phone_id" GROUP BY "T2"."name"