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 -> enumerate domain of column as new columns.. count

enumerate domain of column as new columns.. count

From: tone <dmclaude_at_yahoo.com>
Date: 5 Jul 2002 09:52:39 -0700
Message-ID: <5fff533a.0207050852.20c2d7ae@posting.google.com>


hey everyone.. i cant figure out the answer to this. Id like to do it in SQL/PLSQL if it can be done. ie. i would rather not have to mess with java..
this is the result of a select statement (select app, apptype, count(*) from table1 group by app, apptype;)

app          type    count
app1          A        3
app1          B        2
app2          A        1
app2          C        2

...

im trying to get it to look like this

app          A    B    C    Total
app1         3    2    0      5
app2         1    0    2      3

and for the life of me, i cant figure it out.. i cant even describe the problem in db terms.

can someone, anyone help me.. ???
-confused intern at big company..
ps. i have to go fetch the coffee now. the life of an intern. ya gotta love it! Received on Fri Jul 05 2002 - 11:52:39 CDT

Original text of this message

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