17,086
社区成员
发帖
与我相关
我的任务
分享
--上面代码可简化下
select a
from ((select a,
b,
c,
e,
f,
row_number() over(partition by b, c, f order by a desc) rn
from tableA, tableB
where TABLEA.A = TABLEB.E))
where rn <= 20;
--lz试下,我没试
select a from(
(select a,row_number() over(partition by b,c,f order by a desc) rn from
(select a,b,c,e,f from tableA,tableB where TABLEA.A=TABLEB.E)))
where rn<=20;