title: How to deal with unlimited columns situation on Oracle?
body: <pre><code>    SELECT ITEM_TITLE 
      FROM (SELECT ITEM.ITEM_TITLE
      FROM ITEM JOIN ITEMSELLER ON ITEMSELLER.IS_ITEMID = ITEM.ITEM_ID
      JOIN SELLER ON SELLER.SELLER_ID = ITEMSELLER.IS_SELLERID
      GROUP BY ITEM.ITEM_TITLE
      HAVING COUNT(ITEMSELLER.IS_ITEMID)&gt;1);
  </code></pre>
  
  <p>For Oracle,</p>
  
  <p>I would like to list only the items that have been sold by multiple sellers with the seller's name (everyone).</p>
  
  <p>The code works fine but I can't list the seller name, and want it to compatible when the number of sellers increase (means the columns can be unlimited depends on how many sellers have sold the same item).</p>
  
  <p>From the code above there are 3 tables,</p>
  
  <pre><code>ITEM : has item_title, item_id
  
  SELLER : has seller_id, seller_fname, seller_lname
  </code></pre>
  
  <p>ITEMSELLER : has is_itemid (FK with item_id), is_sellerid (FK with seller_id)</p>
  
  <p>The results should be like this</p>
  
  <pre><code>items        seller_1      seller_2    seller_3.........seller_x
  
  -------      --------      -------     -------          --------
  
  item_a       John          William     (null)           (null)
  
  item_b       William       Bruce       Julia            (null)
  
  item_c       Julia         John        William          Marry
  </code></pre>
  
  <p>or</p>
  
  <pre><code>items        sellers
  
  -------      --------  
  
  item_a       John, William
  
  item_b       William, Bruce, Julia
  
  item_c       Julia, John, William, Marry
  </code></pre>