title: Extracting sub data from a table
body: <p>I would be happy for your help.</p>
  
  <p>I have a table like this : </p>
  
  <pre><code>[MS_CODE] [MS_SML] 
  1            43
  1            AA
  2            51
  3            24
  3            21
  4            11
  4            43
  5            AA
  6            11
  </code></pre>
  
  <p>I want to write a query that will serach for the [MS_SML] which shows up in group (1 or 2 or 3) And (4 or 5 or 6) in [MS_Code]. </p>
  
  <p>For example: </p>
  
  <p>43,AA  because 43 is in a row where ms_code is 1 and 4 and same for 'AA'. I would like to create output like this:</p>
  
  <pre><code>[MS_Code] [MS_SML]
  1            43
  4            43
  1            AA
  5            AA
  </code></pre>
  
  <p>Thank you very much for your help!</p>