What are the names and districts of the phones I can find in Ontario?
select t3.name, t2.district from phone_market as t1 join market as t2 on t1.market_id = t2.market_id join phone as t3 on t1.phone_id = t3.phone_id where t2.district = "Ontario"
What about for each of the market district?
select t3.name, t2.district from phone_market as t1 join market as t2 on t1.market_id = t2.market_id join phone as t3 on t1.phone_id = t3.phone_id
Order those by increasing number of shops.
select t3.name, t2.district from phone_market as t1 join market as t2 on t1.market_id = t2.market_id join phone as t3 on t1.phone_id = t3.phone_id order by t2.num_of_shops
By ranking instead?
select t3.name, t2.district from phone_market as t1 join market as t2 on t1.market_id = t2.market_id join phone as t3 on t1.phone_id = t3.phone_id order by t2.ranking