select f_name,t.maxPrice from fruits,(
select s_id,max(f_price) as maxPrice from fruits group by s_id) t?
where fruits.s_id=t.s_id and fruits.f_price=t.maxPrice
运行结果;
select f_name,t.maxPrice from fruits,(
select s_id,max(f_price) as maxPrice from fruits group by s_id) t?
where fruits.s_id=t.s_id and fruits.f_price=t.maxPrice
运行结果;
版权声明:本站文章来源互联网,如有侵犯您的权益,请及时联系我们处理;