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 -> Question about writing Oracle reports and compute counts

Question about writing Oracle reports and compute counts

From: gail <gailbuf_at_hotmail.com>
Date: 27 Aug 2002 06:34:32 -0700
Message-ID: <a61820ad.0208270534.12010dfa@posting.google.com>


Hi,

I would really appreciate your help with this one:

I have a table which has the following fields (among others):

sender3 varchar2(20)
inq_type varchars2(20)

what i need is a report that will list the count of each transaction type (inq_type) for each sender:

sample output should be something like:

SENDER1   TRANS_TYPE_1 20
  TRANS_TYPE_2 50 SENDER2   TRANS_TYPE_2 25
  TRANS_TYPE_3 10 Here is what I've tried:

ttitle 'Sender Transaction|Report'
btitle 'Confidential'
break on sender3 skip 2
COMPUTE count of inq_type ON sender3

column sender3 HEADING 'Sender' FORMAT A20 --column inq_type HEADING 'Transaction Type' FORMAT A20 select sender3,inq_type
from gail_trans_log
order by sender3,inq_type

This will just give me the total count for each sender, not broken down by transaction type. It also lists each individual transaction, all i want is the total count for each transaction type per sender.

Any help would be much appreciated!

Thanks in advance,

Gail Buffington Received on Tue Aug 27 2002 - 08:34:32 CDT

Original text of this message

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