 	'TOTAL' AS lz_affected,
 	count(sa_code) AS num_records
 FROM
-	zaf.tbl_ofa_outcomes_sas
+	zaf.tbl_ofa_outcomes
 WHERE
     ofa_year = EXTRACT(year FROM current_date)
   AND

    FROM
      zaf.demog_sas_ofa AS f,
      zaf.tbl_lz_mapping AS g,
      zaf.tbl_ofa_outcomes AS h,
      (SELECT DISTINCT mn_code, mn_name FROM zaf.demog_sas) AS i,
      zaf.admin3_dists AS j,
      zaf.tbl_livezones_list AS k,

  ON zaf.admin3_dists(dist_mdb_code);
CREATE INDEX IF NOT EXISTS tbl_wgs_wg_code_idx ON zaf.tbl_wgs(wg_code);

CREATE TABLE IF NOT EXISTS zaf.tbl_ofa_outcomes (
  "tid" serial primary key,
  ofa_year integer,
  ofa_month integer,
