title: Oracle finding the common location between different restriction "codes"
body: <p>this is my first question here. I need to basically find the common location between different restriction codes for an ingredient number.The restriction codes and locations reside in their own table.
  My current query returns something like this (there is more data to this but it is not needed for this question)</p>
  
  <pre><code>ingredient_number   restriction_code
  -----------------   -------------------
   001                NN
   001                R-03
   001                R-02
   002                R-22
   002                NN
   003                R-03
  </code></pre>
  
  <p>The table with all of the restrictions and their locations looks like this</p>
  
  <pre><code>restriction_code   location
  ----------------   --------
  NN                 CLE
  NN                 LAX
  NN                 ORD
  NN                 JFK
  NN                 PIT
  NN                 DFW
  R-03               CLE
  R-03               LAX
  R-02               LAX
  R-02               DFW
  R-22               JFK
  R-03               PIT
  </code></pre>
  
  <p>I need to have the results look like this</p>
  
  <pre><code>ingredient_number  restriction_code common_loc
  -----------------  ---------------- ----------
  001                NN               LAX
  001                R-03             LAX
  001                R-02             LAX
  002                R-22             JFK
  002                NN               JFK
  003                R-03             PIT
  </code></pre>
  
  <p>LAX is common to all three of the restriction codes so we pick that one in this example. </p>
  
  <p>I am guessing that I will need to use an inner join to join the common locations, but I am at a loss for how to figure that out. Any help would be greatly appreciated! I just need pointed in the right direction.</p>