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

Home -> Community -> Usenet -> c.d.o.server -> Re: Need help with query

Re: Need help with query

From: Bob McConnell <bob.mcconnell_at_mci.com>
Date: Thu, 14 Dec 2000 21:16:49 GMT
Message-ID: <3A3939B1.6E7EA087@mci.com>

Thanks Jay,
 just what I was looking for.

Bob

Jay Weiland wrote:

> Hey Bob,
>
> It would look like:
>
> Select mega, count(*)
> from
> (select field1 mega from your_table_name
> UNION ALL
> select field2 mega from your_table_name
> UNION ALL
> select field3 mega from your_table_name)
> group by mega
> /
>
> ME COUNT(*)
> -- ---------
> a 4
> b 1
> c 2
> d 1
> e 1
>
> Jay!!!
>
> Bob McConnell wrote:
>
>> Hi,
>> I have a table with 3 fields and I need to count the data without
>> reguard to the field it is in.
>>
>> field1 filed2 field3
>> a b c
>> d c a
>> e a a
>>
>> I need to report that the count is
>> a 4
>> b 1
>> c 2
>> d 1
>> e 1
>>
>> Is this possible??
>>
>> thanks,
>> Bob
>
  Received on Thu Dec 14 2000 - 15:16:49 CST

Original text of this message

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