 		round(pop_curr * pc_wg * pc_wg_affected * CAST( deficit > 0.005 AS INTEGER), 0) AS pop_food_def,
 		round(pop_curr * pc_wg * pc_wg_affected * deficit * 2100 / 3360.0 / 1000, 4) AS def_maize_eq
 	FROM
-		zaf.tbl_ofa_outcomes_sas,
+		zaf.tbl_ofa_outcomes,
 		(VALUES
 				(1, 'very poor'),
 				(1, 'casuals'),

;


INSERT INTO zaf.tbl_ofa_outcomes_sas (
  ofa_year,
  ofa_month,
  sa_code,

  ON zaf.demog_sas_ofa(dc_code, mn_code, lz_code, lz_affected);
CREATE INDEX IF NOT EXISTS tbl_lz_mapping_lz_code_idx ON zaf.tbl_lz_mapping(lz_code, lz_analysis_code);
CREATE INDEX IF NOT EXISTS tbl_demog_sas_ofa_dc_code_idx ON zaf.demog_sas_ofa(dc_code);
CREATE INDEX IF NOT EXISTS tbl_ofa_analysis_lz_wg_code_affected_ofa_year_month_idx
  ON zaf.tbl_ofa_analysis(lz_code, lz_affected, wg_code, ofa_year, ofa_month);
CREATE INDEX IF NOT EXISTS demog_sas_mn_code_name_idx ON zaf.demog_sas(mn_code, mn_name);
CREATE INDEX IF NOT EXISTS admin3_dists_dist_code_idx ON zaf.admin3_dists(distcode);
CREATE INDEX IF NOT EXISTS tbl_livezones_list_lz_code_idx ON zaf.tbl_livezones_list(lz_code);
