题解 | #列出供应商及其可供产品的数量#
列出供应商及其可供产品的数量
http://www.nowcoder.com/practice/17f22851cf204019b51a36761a3afc79
select v.vend_id, count(p.prod_id)
from Vendors v
left join Products p
on v.vend_id = p.vend_id
group by v.vend_id
order by vend_id
列出供应商及其可供产品的数量
http://www.nowcoder.com/practice/17f22851cf204019b51a36761a3afc79
select v.vend_id, count(p.prod_id)
from Vendors v
left join Products p
on v.vend_id = p.vend_id
group by v.vend_id
order by vend_id
相关推荐