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 -> Intermediate SQL problem

Intermediate SQL problem

From: <nameproliferation_at_my-deja.com>
Date: Wed, 08 Dec 1999 21:33:42 GMT
Message-ID: <82mirm$ql1$1@nnrp1.deja.com>


Hello,

I'm hoping someone can help me formulate the SQL I need to do this report.

I have to calculate statistics off a single table, listed by state, on another table:

STATE ( st_abbrev, st_name );
POPULATION ( process_id, st_abbrev, gender, err_code, selected );

I need the count, by state, of each of the field values. The report header looks like:

Process: XXX
State Total Population Total Male Total Female Total Selected \

=====  ================  ==========  ============  ============== \

Total Male Selected Total Female Selected Error Code Error Total

===================  =====================   ==========  ===========

Note that the last 2 fields are really a table in a table!

Sheesh!

I think this can be done in 1 select (esp. if the error part is dropped), but I'm having a real problem. Can someone help!??

Thanks much!
-=np=-

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Dec 08 1999 - 15:33:42 CST

Original text of this message

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