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 -> How do I count Columns in Different Tables??

How do I count Columns in Different Tables??

From: <stuco_at_mailcity.com>
Date: Thu, 09 Sep 1999 20:00:54 GMT
Message-ID: <7r93lc$ufj$1@nnrp1.deja.com>


Problem:

I need to perform an aggregate count of columns in different tables that have relationships to each other. Here's how I envision it, but it is not working:

  SELECT COUNT(A.CUSTOMER_NO), COUNT(B.ITEMS_PURCHASED)   FROM CUSTOMER A, SALES B
  WHERE A.DATE = '01-SEP-99'
  AND B.DATE = '01-SEP-99'
  /

What I get is the same number on each count() every time, but in separate queries the number is different. Is there anyway to accomplish this with one query?

TIA Stuart Cowen

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Sep 09 1999 - 15:00:54 CDT

Original text of this message

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