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 -> Oracle reporting in SQL PLUS

Oracle reporting in SQL PLUS

From: <Melissa_at_induhouse.com>
Date: Thu, 3 Jun 1999 20:37:56 -0400
Message-ID: <7j77bf$23k$1@autumn.news.rcn.net>

I have an audit project that I am currently working on and I have to run =
distributions on multiple columns one of the questions I have is that in =
the following query how can I get a total of count(*) What I want to see =
is the count for each value and a total count of all values i.e.

column REV_BANK_AVAIL_CR_306 heading 'REVOLVING_AVAIL_CREDIT' format = $999,999,999
select (REV_BANK_AVAIL_CR_306 - mod(REV_BANK_AVAIL_CR_306,25000)) as = REV_BANK_AVAIL_CRDT_306,count(*)
from prospect.resp_test_tb
where source_file_id between '&&BEGGING_DATE' AND '&&END_DATE' and status_actual='R'
group by (REV_BANK_AVAIL_CR_306 - mod(REV_BANK_AVAIL_CR_306,25000)) order by (REV_BANK_AVAIL_CR_306 - mod(REV_BANK_AVAIL_CR_306,25000))

rev_avail_crdt       count(*)
--------------------     ---------------
100,000             20
200,000             30
300,000             10

total count(*)      60

is there a way to do this in one query?

My second questions is that I have the same queries that I have to run = on 2 different tables I want to see the counts on both is there a way to = display this side by side? WITH OUT CUTTING AND PASTING INTO A = SPREADSHEET
i.e.

TABLE ONE                                  TABLE 2
rev_avail_crdt       count(*)              rev_avail_crdt        =
count(*)              
--------------------     ---------------            -----------------    =
      ------------
100,000             20                        100,000                20
200,000             30                        200,000                30
300,000             10                        300,000                10

total count(*)      60                        total count(*)          60


THANKS IN ADVANCE
DAN Received on Thu Jun 03 1999 - 19:37:56 CDT

Original text of this message

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