Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:

Convert text to sql: For each phone, show its names and total number of stocks. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | 

### Response:

select _ , sum ( _ ) from _ group by _ | select phone.name , sum ( phone_market.num_of_stock ) from phone_market join phone on phone_market.phone_id = phone.phone_id group by phone.name