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: query question

Re: query question

From: gmuldoon <gmuldoon_nospam_at_scu.edu.au>
Date: Tue, 13 Apr 2004 05:35:34 GMT
Message-ID: <MPG.1ae6271aa534ebe19896d1@news.asgard.net.au>


spedwards_at_x.qwest.net says...
> I have a table of 20,000 rows in which I'm trying query 3 specific columns.
> Column A is a number and there are only 10 distinct numbers in column A,
> Column B is varchar which has about 25 distinct variations, and column B
> is another number but has 500 distinct numbers.
>
> I'm trying to query these 3 columns and count the number of distinct
> combinations
> of columns B and C for each of 10 distinct numbers in column A. But, I have
> just
> wall with this one.

Dunno why. Just a distinct concatenation of the two columns.

select colA, count( distinct colB||colC) from tablename
group by colA

Geoff M Received on Tue Apr 13 2004 - 00:35:34 CDT

Original text of this message

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