select vend_id,min(prod_price) cheapest_item from Products group by vend_id order by cheapest_item; group by执行顺序在select之前,所以会先按vend_id分组,再取最低的数字; order by执行在select后,可直接用别名

select vend_id,min(prod_price) cheapest_item from Products group by vend_id order by cheapest_item; group by执行顺序在select之前,所以会先按vend_id分组,再取最低的数字; order by执行在select后,可直接用别名