-- Find the bundle_id's for bundles with the same composition as

-- bundle_id=1.

variable b number
begin :b := 1; end;
/


select distinct bundle_id
  from intersections outer
  where bundle_id  != :b
  and not exists
  (

    (
     select item_id from intersections where
       bundle_id = :b
     minus
     select item_id from intersections where
       bundle_id = outer.bundle_id
    )

   union
    (
    select item_id from intersections where
      bundle_id = outer.bundle_id
    minus
    select item_id from intersections where
      bundle_id = :b
    )

  );