Skip to content

Commit

Permalink
Merge pull request #256 from TEAMSchools/deanslist-extracts
Browse files Browse the repository at this point in the history
Deanslist extracts
  • Loading branch information
cbini authored Aug 16, 2023
2 parents b9e8f8c + 153bc03 commit 010ac7e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ with
select
co.studentid,
co.student_number,
co.state_studentnumber as sid,
co.state_studentnumber as `SID`,
co.advisory_name as team,
co.home_phone,
co.contact_1_name as parent1_name,
Expand Down Expand Up @@ -60,7 +60,7 @@ with
ktc.contact_owner_phone as ktc_counselor_phone,
ktc.contact_owner_email as ktc_counselor_email,

gpa.gpa_y1,
gpa.`GPA_Y1`,
gpa.gpa_term,

if(co.schoolid = 999999, ug.schoolid, co.schoolid) as schoolid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ with
select
student_number,
academic_year,
round(weighted_points / credit_hours, 2) as gpa_y1_weighted,
round(unweighted_points / credit_hours, 2) as gpa_y1_unweighted,
round(weighted_points / credit_hours, 2) as `GPA_Y1_weighted`,
round(unweighted_points / credit_hours, 2) as `GPA_Y1_unweighted`,
from points_rollup

union all
Expand All @@ -49,8 +49,8 @@ select

null as academic_year,

sg.cumulative_y1_gpa as gpa_y1_weighted,
sg.cumulative_y1_gpa_unweighted as gpa_y1_unweighted,
sg.cumulative_y1_gpa as `GPA_Y1_weighted`,
sg.cumulative_y1_gpa_unweighted as `GPA_Y1_unweighted`,
from {{ ref("base_powerschool__student_enrollments") }} as co
inner join
{{ ref("int_powerschool__gpa_cumulative") }} as sg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ with
sg.earnedcrhrs as credit_hours,
sg.percent as y1_grade_percent,
sg.grade as y1_grade_letter,
case
when sg.schoolname = 'KIPP Newark Collegiate Academy'
then 'Newark Collegiate Academy'
else sg.schoolname
end as schoolname,
sg.storecode as term,
if(
sg.schoolname = 'KIPP Newark Collegiate Academy',
'Newark Collegiate Academy',
sg.schoolname
) as schoolname,

1 as is_stored,
from {{ ref("stg_powerschool__storedgrades") }} as sg
Expand All @@ -40,13 +40,14 @@ with
fg.y1_percent_grade_adjusted as y1_grade_percent,
fg.y1_letter_grade as y1_grade_letter,

'Y1' as term,

if(
sch.name = 'KIPP Newark Collegiate Academy',
'Newark Collegiate Academy',
sch.name
) as schoolname,

'Y1' as term,
0 as is_stored,
from {{ ref("stg_powerschool__students") }} as s
inner join
Expand Down

0 comments on commit 010ac7e

Please sign in to comment.