0

I want to get get 6 "double_scoring" records and 4 "singe_scoring" records from my Profiles table based on SCORING_RULE column values. Can you please let me know how can I do this with SELECT query where I am just selecting 10 records with ROWNUM <= 10 limit. enter image description here

1 Answer 1

0

Please try this query:

select * from PROFILES where 
SCORING_RULE = 'double_scoring' and
ROWNUM <= 6
union
select * from PROFILES where 
SCORING_RULE = 'single_scoring' and
ROWNUM <= 4

Check it here: http://sqlfiddle.com/#!4/7ecc95/1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.