Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Intermediate SQL problem
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