Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to randomly select rows by percentage of rows by specific column

1418935Feb 12 2015 — edited Feb 13 2015

I need to select exact 20% of rows by department randomly. Ex, table consists 50 records for sales department, 60 records for hr department. I need to get 10 records from sales department and 12 records from hr department. but the records should be randomly selected. how would i come out from it? Thanks in advance.

This post has been answered by chris227 on Feb 12 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2015
Added on Feb 12 2015
9 comments
4,043 views