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 -> Count?

Count?

From: Jane H. <memberjh_at_yahoo.com>
Date: Mon, 17 May 1999 14:43:25 -0400
Message-ID: <7hpo0u$amh@sjx-ixn4.ix.netcom.com>


PROBLEM: Count how many of each of table 1 is in table 2. Simple right? I just can't get it.



GIVEN: (simplified data)

Table 1

ID         Field1
1             apple
2             bat
3             cat


Table 2
ID         Field15
1           apple juice
2           apple cider
3           apple
4           bat
5           baseball bat
6           cat
7           cat woman


__________________________________________________
DESIRED QUERY RESULTS:
Data        Count
apple         3
bat             2
cat             2



________________________________________________
COMMENTS: I have been able to count each table separately,

SELECT Table1.Field1, Count(*) AS OrderCount FROM Table1.Field1
GROUP BY Table1.Field1;

but combining them to get the desired result eludes me.

Any help is appreciated.

Thanks in advance:) Received on Mon May 17 1999 - 13:43:25 CDT

Original text of this message

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