题解 | #列出供应商及其可供产品的数量#
列出供应商及其可供产品的数量
https://www.nowcoder.com/practice/17f22851cf204019b51a36761a3afc79
select t.vend_id,count(prod_id) as order_num from Vendors t left join Products t1 on t.vend_id = t1.vend_id group by t.vend_id order by t.vend_id
如果保持良好的协作习惯,那么这个语句将和上一个完全一样。