当前位置:Gxlcms > 数据库问题 > oracle 多对一时只去前两条数据sql

oracle 多对一时只去前两条数据sql

时间:2021-07-01 10:21:17 帮助过:22人阅读

 (select table5.shopareaid,table5.usersid ,table5.username  from   (select sg.shopareaid,u1.usersid,u1.username,row_number() OVER(PARTITION BY sg.shopareaid ORDER BY sg.shopareaid desc) numbers from shops s, shopgroup sg,users u1 where s.shopgroupid = sg.shopgroupid and   u1.companysid=7 and u1.usertitle = 40 and u1.status<=2 and s.shopsid=u1.residentshopid) table5 where table5.numbers=1) table1,

 

.

oracle 多对一时只去前两条数据sql

标签:sql   stat   order by   group   use   res   tle   art   from   

人气教程排行