User Tools

Site Tools


Special Programs

Enrollment in some programs (ELL, Special Education, Learning Center) is tracked through the spenrollments table. The following programid values are relevant:

  • Special Ed: 1350 (Resource), 1404 (Self-Contained)
  • ELL: 5225
  • Learning Center: 6213

Example SQL

To pull most recent record for a program (LC in this example)

--get latest LC record
maxdates_lc AS (
  SELECT studentid, MAX(enter_date) latest_date
  FROM spenrollments
  WHERE programid = 6213
  GROUP BY studentid
--pull only records from a certain date
lclist AS (
  SELECT studentid, 1 AS lc
  FROM maxdates_lc
  WHERE latest_date >= to_date('2012-08-01', 'YYYY-MM-DD')
techprivate/powerschool/specialprograms.txt · Last modified: 2012/10/02 10:31 by afrink