Oracle 在分组的同时,取每个分组的前几条PARTITION BY

select * from (
SELECT b,c,row_number() OVER( PARTITION BY b ORDER BY c desc) e FROM test_abc) t where e <= 3
 
posted @ 2018-04-09 15:44  hobby0524  阅读(185)  评论(0编辑  收藏  举报