Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> How to get different columns total in one time query?
Hi, can someone help me, please?
I have a big table with two different fields f1 and f2, there are many many different combinations of these two fields values.
Now I need to do this:
select f1, count(*) from table group by f1; select f2, count(*) from table group by f2;
Each count may take long time. Can I run one query on the two fields, and still get separate total counts of the different field-values, with SQL*Plus only?
Thanks. Received on Wed Jun 08 2005 - 10:38:40 CDT
![]() |
![]() |