SQL for Perkins Completers
By Peggy Medema
June 8, 2010

I wrote a little script in SQL to find my Perkins Completers (or at least be able to find anyone who qualified without having to sort through them one at a time). I created and saved a different one for each pathway. You can just change the course numbers and school id to match yours.

I wanted to be able to pull only those students who had taken ALL of the courses, but I couldn't figure out the syntax. If someone knows that and would share, that would be great!!

SELECT S.LASTFIRST, SG.COURSE_NUMBER, SG.COURSE_NAME, SG.GRADE

FROM STOREDGRADES SG, STUDENTS S

WHERE S.ID = SG.STUDENTID
AND SG.GRADE_LEVEL >= 9
AND SG.COURSE_NUMBER IN ('201','205','2011','203')
AND SG.STORECODE IN ('S1','S2')
AND S.ENROLL_STATUS = 0
AND S.SCHOOLID = 160006
AND SG.TERMID >= 1600
ORDER BY S.LASTFIRST ASC, SG.COURSE_NUMBER ASC

Peggy Medema
Valentine Community Schools