title: create query to get all components that refer to all selected ids of substances
body: <p>Need your help to create some oracle SQL query, let's first see the design of my tables</p>
  
  <pre><code>Component table has two cols id(pk) and name
  
  Substance table has two cols id(pk) and name
  </code></pre>
  
  <p>The Component consists of many substances so I created a third table 
  Comp_Subs has two cols <code>comp_id(fk to Component)</code> and <code>sub_id(fk to substance)</code> and the cols together are unique.</p>
  
  <p>Given some ids of substances, Create a query to get all components that have all the given substances</p>
  
  <p><a href="https://i.stack.imgur.com/oaBGK.png" rel="nofollow noreferrer">Table Schema</a></p>
  
  <p>Example: given these ids of substances 1, 2, 3 create a query that will retrieve all Comps that have all the selected substances.</p>
  
  <p>input : 1,2,3</p>
  
  <p>Output will one column contains the result like that</p>
  
  <p><a href="https://i.stack.imgur.com/otIDc.png" rel="nofollow noreferrer">Output</a></p>
  
  <p>The result of the given example should return comp1 and comp2 
  Because comp1 contains substances 1, 2 and 3
  And comp2 also contains 1, 2 and 3</p>