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