Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with Query
On Nov 25, 9:52 am, "Jeff B" <jef..._at_KnoSpam.tds.net> wrote:
> 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
cheater Received on Tue Dec 04 2007 - 17:01:51 CST
![]() |
![]() |