Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL: How to see items from more than one vendor

Re: SQL: How to see items from more than one vendor

From: Alexander Bogomol <bogomol_at_investbank.ru>
Date: Wed, 8 Dec 1999 10:12:40 +0200
Message-ID: <9455EAF0C99FD111B85B0060B067688AE41327@E40>


select item,count(vendor) from item_vendor group by item having count(vendor)>1
/



Alex
dmausner_at_ameritech. .net (dave mausner) пишет в сообщении ...
>In article <JhFPOJwcFBAWNq5D2utQfJIA4xJf_at_4ax.com>, Dave Rawding
<daverawding_at_mediaone.net> wrote:
>>Given an item_vendor table with fields item, vendor, etc. how do I
>>find situations where the same item is purchased from more than one
>>vendor?
>
>select * from item_vendor a,
> (select item from
> (select distinct item,vendor from item_vendor)
> group by item having count(*) > 1) b
>where a.item = b.item
>/
>
>--
>Dave Mausner, Senior Manager, Braun Consulting Inc., Chicago.
Received on Wed Dec 08 1999 - 02:12:40 CST

Original text of this message

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