SQL Schema

ralfred
Trainee

SQL Schema

Hello!

I am pretty new to PowerSchool. I have a query that appears to be returning 0 records. I think there may be a column that is no longer active? not 1000% sure. I would like to run a query to pull the Schema for everything dealing with the grade book but im not sure how to do that in PowerSchool. 

 

Also, here is my query incase it might actually be a syntax issue. 

 

But even still I would love to pull that schema to see if I am doing this correctly. Thanks. 

 

 

SELECT
s.last_name AS last,
s.first_name AS first,
s.student_number AS id,
s.home_room AS advisor,
CASE WHEN ps_customfields.getStudentscf(s.id,'FTE_Category') = 'GE' THEN 'N' ELSE 'Y' END as SWD,
s.grade_level AS gr,
g.sectionid AS sectid,
secs.course_number as code,
c.course_name AS course,
t.lastfirst AS teacher,
g.grade AS grade
FROM
students s
JOIN PGFinalGrades g ON g.STUDENTID = s.id
JOIN sections secs ON secs.ID = g.SECTIONID
JOIN courses c ON c.course_number = secs.course_number
JOIN sectionteacher st ON st.SECTIONID = g.SECTIONID
JOIN ps.teachers t ON t.ID = st.TEACHERID
JOIN CC ON CC.STUDENTID = s.ID AND CC.SECTIONID = secs.ID
WHERE
s.enroll_status = 0
AND secs.termid >= '3200'
AND g.FinalGradeName = 'T1'
AND st.roleID = 10
AND st.Start_Date <= TO_CHAR(SYSDATE,'DD-MON-YY') AND st.End_Date >= TO_CHAR(SYSDATE,'DD-MON-YY')
ORDER BY
cohort DESC, last, first, course
 

0 Replies