title: Comparing data from multiple datasets
body: <p>I will try to explain my issue as best I can but let me know if more details are needed.</p>
  
  <p>I am querying a group of IDs which fit a specific criteria and I want to compare it to another. So, for example, I have 50 IDs for spring 2013, 39 IDs for summer 2013, and 53 IDs for fall 2013. I want to be able to compare each list with the list that comes after it and output the IDs (or just a number) of the people who are in both. </p>
  
  <p>I am able to do this right now by specifying in the where clause the exact lists to compare but I would like to be able to have it run over many years comparing one list with the one that comes after.</p>
  
  <p>EDIT:</p>
  
  <p>Sample data (right now I can just pull 2 lists at a time to compare them):</p>
  
  <pre><code>SPRING2013IDS | SUMMER2013IDS | FALL2013IDS | SPRING2014IDS
  01            | 01            | 01          | 01
  02            | 02            | 04          | 02
  03            | 04            | 05          | 03
  04            | 05            | 08          | 08
  05            | 08            | 10          | 09
  06            | 10            | 12          | 12
  07            | 11            | 13          | 13
  08            | 12            | 14          | 14
  </code></pre>
  
  <p>I want to compare the lists and have an ouput of:</p>
  
  <pre><code>Spring2013toSummer2013 | Summer2013toFall2013
  01                     | 01
  02                     | 04
  04                     | 05
  05                     | 08
  08                     | 10
                         | 12
  </code></pre>
  
  <p>and so on...<br>
  I really don't even need the ID numbers in the final outcome (an amount would be fine) because what I'm going to do is just calculate the percentage of IDs that continued from one to the next but I figured I can do that on my own once I get the process flowing better.</p>