1. 业奇农业网 > 资讯 >

MySQL查询fruits表中不同s_id下价格最高的水果名称以及这些水果的价格?

select f_name,t.maxPrice from fruits,(

MySQL查询fruits表中不同s_id下价格最高的水果名称以及这些水果的价格?

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

运行结果;

本文由用户上传,如有侵权请联系删除!转转请注明出处:https://nongye.s666.cn/news/1_657854354.html