diff --git a/aws-athena/views/default-vw_pin_appeal.sql b/aws-athena/views/default-vw_pin_appeal.sql index a540b4221..f5a792a54 100644 --- a/aws-athena/views/default-vw_pin_appeal.sql +++ b/aws-athena/views/default-vw_pin_appeal.sql @@ -75,3 +75,4 @@ LEFT JOIN {{ source('iasworld', 'htagnt') }} AS htagnt ON htpar.cpatty = htagnt.agent WHERE htpar.cur = 'Y' AND htpar.caseno IS NOT NULL + AND htpar.deactivat IS NULL diff --git a/aws-athena/views/reporting-vw_ratio_stats.sql b/aws-athena/views/reporting-vw_ratio_stats.sql index d73e08f29..7d7336fe7 100644 --- a/aws-athena/views/reporting-vw_ratio_stats.sql +++ b/aws-athena/views/reporting-vw_ratio_stats.sql @@ -67,6 +67,7 @@ iasworld_values AS ( WHERE (asmt_all.valclass IS NULL OR asmt_all.taxyr < '2020') AND asmt_all.procname IN ('CCAOVALUE', 'CCAOFINAL', 'BORVALUE') AND asmt_all.taxyr >= '2021' + AND asmt_all.deactivat IS NULL GROUP BY asmt_all.parid, asmt_all.taxyr,