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