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

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

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

运行结果;

1、MySQL Community Edition社区版免费

2、MySQL Enterprise Edition includes the most comprehensive set of advanced features, management tools and technical support to achieve the highest levels of MySQL scalability, security, reliability, and uptime.

3、MySQL Standard Edition enables you to deliver high-performance and scalable Online Transaction Processing (OLTP) applications.  It provides the ease of use that has made MySQL famous along with industrial strength performance and reliability.


欢迎分享,转载请注明来源:夏雨云

原文地址:https://www.xiayuyun.com/zonghe/240218.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-11
下一篇2023-04-11

发表评论

登录后才能评论

评论列表(0条)

    保存