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 run a select count(*) with multiple rows returned

Stanley Lee-OracleSep 16 2011 — edited Sep 17 2011
Hi,

I have to run a select count(*) for different reports.

1) Select count(*) from table
where state = 'CA'

2) Select count(*) from table
where state = 'NY'

3) Select count(*) from table
where state = 'NV'

Instead of running this query again for 50 times, is there a way for me to just put it in one query and get multiple row returns? Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2011
Added on Sep 16 2011
7 comments
2,162 views