17,089
社区成员
发帖
与我相关
我的任务
分享
select id, name, group, cost
from (select id,
name,
group,
cost,
row_number() over(partition by group1 order by cost desc) fn
from Item)
where fn = 1
select id,name,group,cost from item, (select group gp,max(cost) maxcost from item group by group) where group=gp and cost =maxcost;