SQL and PowerSchool

As a “back-end” PowerSchool guy or gal, you may occasionally be asked to pull out data for which there is no pre-built report. In most cases this is possible, but it’s also usually really complicated. The purpose of this post is to (hopefully) provide you with some direction when you are “voluntold” to do undertake such a task.

Data Dictionaries

Chances are you’re somewhat familiar with PowerSchool’s Data Dictionary. The Data Dictionary is a massive PDF reference that defines each table and field in PowerSchool – except for the ones in Gradebook. After spending an hour and a half on the line with support one time, we discovered together that their exists a completely separate Data Dictionary just for the Gradebook. It’s called the PowerSchool Gradebook Data Dictionary. So, if you’re tasked with pulling out all of the standards based grades for a single assignment that can be parsed by school, standard, and teacher like I was, you’re going to want to look there to figure out how all of the tables tie together

High Level Concept

What you’ll find is that there exist many tables, and each table is connected to another by a common column. For example, the WhoCreated column in the psm_assignmentstandardscore table contains the same values as the id column in the psm_teacher table. By using the tool SQL Developer (by Oracle), we can connect directly to our database and write custom queries in a language called SQL to output the data in a manner that is useful. When we query data from multiple tables, we have to choose one table FROM where we are going to conduct our search and then “JOIN” the other tables to the first to eventually generate a new spreadsheet that contains the data that we actually want. Sometimes we need to join one table, to another, to another, TO ANOTHER! to get what we are looking for.

Basically, you are going to find that all of the data you want in your output is divided among many tables, and you are going to have to reference the Data Dictionary to figure out how all of the tables connect.


Once you’ve figured out how to get at the data you seek, you’re going to realize that there is WAY MORE of it than you realized. For example, there existed over 1,800,000 individual standards-based grades at the time I ran the query below, and our district is only in its second year with the system! Fortunately, you can use WHERE and LIKE statements to only return values that meet certain conditions – like if the standard identifier contains the characters ELA, or if the assignment abbreviation = EALU2.

My Query

The query below returned all of the standards-based scores that were attached to a common assessment that every student in our district completed. In order for this query to work, teachers had to use the same Abbreviation, when they entered the assisgnment into their gradebooks. The code below is heavily commented. Everything in between /* and */ is a comment. The syntax highlighter plugin I’m using isn’t displaying SQL code well, so I set it to plain text, but if you copy and paste it into a text editor like Notepad++ and set the language to SQL it should become much easier to read.

After you watch a couple of SQL tutorials on YouTube, the code below should provide you with a pretty good understanding of how every comes together when you’re faced with such a challenge.

Two Last Things

Once you extract the data, you’ll probably have to save it as a .CSV, open it in Excel or a Google Spread Sheets, insert a pivot table, and manipulate the data as you see fit. If you don’t know what a pivot table is, and you have to deal with large volumes of data, you need to spend more time watching tutorials on YouTube.

It can be very helpful to sketch out what the tables look like. I wouldn’t have written this query successfully without staring at this sketch for WAY TOO LONG.

The Code

One thought on “SQL and PowerSchool

  1. I am a data analyst with Cabarrus County Schools and need help figuring out how to find students without a full schedule using oracle or access.

    My colleague and I have only gotten so far and keep getting hung up on the membership default table…any suggestions?

Comments are closed.