求一个sql语句
答案:1 悬赏:20
解决时间 2021-03-05 18:55
- 提问者网友:鼻尖触碰
- 2021-03-05 01:06
求一个sql语句
最佳答案
- 二级知识专家网友:拜訪者
- 2021-03-05 02:09
MYSQL 写法, 没实际试过, 假设表名为 table:
select t2.* from (
select t1.id, t1.name, max(t1.price) as max_price
from table as t1
group by t1.name
) as t2
order by t2.max_price desc
select t2.* from (
select t1.id, t1.name, max(t1.price) as max_price
from table as t1
group by t1.name
) as t2
order by t2.max_price desc
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯