mysql没有Outter Join?
列出供应商及其可供产品的数量
http://www.nowcoder.com/practice/17f22851cf204019b51a36761a3afc79
之前有一题说要用outter join
其实left和right join都属于outer join
且根据题目的描述,这里并不适合使用全连接(使用左连接,结果如下)
select Vendors.vend_id as vend_id, count(Products.prod_id) as prod_id
from Vendors
left join Products
on Vendors.vend_id = Products.vend_id
group by Vendors.vend_id
order by Vendors.vend_id