Standard Deviations with CTE’s in SQL I was working with a client recently getting the number of standard deviations a student was off the average number of suspensions. I accomplished this with two Common Table Expressions, (CTE). The first CTE gets the standard deviation and the average for the entire database. The Database holds all of the schools in the district and this CTE gives use the overall average. The second CTE gets the number of suspensions summed up and grouped by student. In the ...
Read More