title: SQL index match to find duplicate data
body: <p>I have the following table</p>
  
  <pre><code>Code     Name    Task
  aa       jones   DC
  ab       dave    DC
  aca      james   IF
  aca      james   DC
  ab       trevor  IF
  aa       jones   IF
  ag       francis DC
  ag       francis IF
  af       derek   SF
  af       derek   DC
  </code></pre>
  
  <p>This is a very big table, above is just a quick example. </p>
  
  <p>So, I would like some help finding the code and name that have completed a <code>IF</code> or <code>SF</code> task and a <code>DC</code> task. </p>
  
  <p>I would like it to show where one person has touched both of these tasks. The hierarchy of the tasks is; it comes in as either a <code>SF</code> or <code>IF</code> then someone will do that, then off the back of that we receive a <code>DC</code> task, and I want the ones where it has been completed by the same person, with the same reference number.
  I am able to do this in excel with an INDEX MATCH function, but this takes up a tremendous amount of calculation time due to the size of the table.</p>