Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> how to use count(*) in "group by" queries
I am trying to use count(*) to prevent queries from executing that are
blowing out memory. The query comes in two forms:
(1) select a, b, c, d from x, y, z where...;
which I can count first like this:
select count(*) from x,y,z where...; ==> easy enough
The other form is:
(2) select count(*), a, b, max(c), max(d) from x,y,z where... group by
a,b;
this query already has a count(*), which counts the number of rows in
each group. How can I count the number of groups that will be returned
without actually doing the full query?
Thanks,
Martin
Received on Tue Nov 21 2006 - 09:30:50 CST
![]() |
![]() |