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 can I compare column value inside COUNT() function?

864626Jul 11 2011 — edited Jul 11 2011
I want to compare column value inside COUNT() function like below how ever it gives me error. I want to compute percentage, how can I do this task?
Thanks.


SELECT department_id
, COUNT(salary < 250000) / COUNT(*)
FROM plch_employees
GROUP BY department_id
ORDER BY department_id;
This post has been answered by Solomon Yakobson on Jul 11 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2011
Added on Jul 11 2011
6 comments
339 views