Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL: Multiple counting

Re: SQL: Multiple counting

From: Marco Shaw <marco_at_Znbnet.nb.ca>
Date: Fri, 29 Jul 2005 14:25:27 GMT
Message-ID: <r%qGe.66817$Ph4.2093993@ursa-nb00s0.nbnet.nb.ca>


> > But I have not been able to figure out how to extend that to keep totals
of
> > the other columns when they match '1'.
> >
> > Marco
> >
> >
>
> You can use that fact, that the count of values containing 1 in a
> dataset containing only 1 and 0 is equal to sum of that values.

OK, that might work. I'd like to know if there's a better way to do it. In my example, I may be able to do a sum, but that may not be the case if I need to extend my report to other columns.

Marco Received on Fri Jul 29 2005 - 09:25:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US