Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL: How to see items from more than one vendor
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 Tue Dec 07 1999 - 22:36:25 CST
![]() |
![]() |