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

Re: Help with Query

From: <ssanchezz_at_gmail.com>
Date: Tue, 4 Dec 2007 15:01:51 -0800 (PST)
Message-ID: <20dddee6-b262-4c2e-85ec-4c025afdcc97@d4g2000prg.googlegroups.com>


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

Original text of this message

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