sql - Oracle select top N rows based on Values -
say if have table following column,
marks 60 80 70 90 95 90 70 i need select rows mark in top 4, ie. in case, >=70 , 6 rows should returned.
i'm not sure how this, can please? thanks.
select marks ( select marks, dense_rank() on (order marks desc) marksrank yourtable ) marksrank <= 4
Comments
Post a Comment