I am trying to come up with a query to track a student cohort based on their start term. I want to see if the number of students that started in 2012 actually go down in 4 years time. For this example I am starting with fall 2012 (12/FA). I am closer to where I want to be from where I started. Nevertheless, the results I want should be:
| Student Cohort 2012 | Year |
------------------------------
| 2 | 2012 |
| 1 | 2013 |
| 1 | 2014 |
| 0 | 2015 |
But these are the results I am getting:
| Student Cohort 2012 | Year |
------------------------------
| 2 | 2012 |
| 6 | 2014 |
I have created an SQLFiddle of data that can be viewed here: http://sqlfiddle.com/#!2/1547e/3
Any help with figuring this out is greatly appreciated.