diff --git a/pipeline/transform/models/marts/dim_school.sql b/pipeline/transform/models/marts/dim_school.sql index 014acbe..c2fc641 100644 --- a/pipeline/transform/models/marts/dim_school.sql +++ b/pipeline/transform/models/marts/dim_school.sql @@ -15,7 +15,7 @@ select s.local_authority_code * 1000 + s.establishment_number as laestab, s.school_name, case - when s.phase is not null and s.phase != 'Not applicable' then s.phase + when s.phase is not null and lower(s.phase) != 'not applicable' then s.phase when s.statutory_high_age is not null and s.statutory_high_age <= 11 then 'Primary' when s.statutory_low_age is not null and s.statutory_low_age >= 11 then 'Secondary' when s.statutory_low_age is not null and s.statutory_high_age is not null