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 -> Help with Query

Help with Query

From: Jeff B <jeffby_at_KnoSpam.tds.net>
Date: Sun, 25 Nov 2007 14:52:03 GMT
Message-ID: <n_f2j.40493$G23.2860@newsreading01.news.tds.net>


Hi everyone,

I have a book table and in that table it has the book tile, publisher, and type of book it is. example mystery, scifi, etc...

I am trying to write a query that brings back a list of every pair of books that have the same publisher and same book type. I have been able to get the following code to work:

select publisher_code, type
from book
group by publisher_code, type
having count(*) > 1;

which returns the following results:

PU TYP
-- ---
JP MYS
LB FIC
PE FIC
PL FIC
ST SFI
VB FIC I can not figure out how to get the book title and book code for the books that this result list represents, everything i have tried throws out an error.

Can someone help?

Thanks,

Jeff Received on Sun Nov 25 2007 - 08:52:03 CST

Original text of this message

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