 		AND ta.campaign_id = d.campaign_id
 		AND ta.indicator_id = d.indicator_id;
 
+
+		--- UPDATE THE REST OF THE DATAPOINT TABLE --
+
+		UPDATE datapoint d
+		SET cache_job_id = $1
+		WHERE d.id in (
+			SELECT datapoint_id
+			FROM _to_agg ta
+			WHERE ta.datapoint_id IS NOT NULL
+		);
 
 		-- UPDATE EXISTING --
 		UPDATE agg_datapoint ad

 			WHERE EXISTS (
				SELECT 1 FROM datapoint d
				WHERE d.region_id = rg.id
				AND d.cache_job_id = $1
			)

		  	UNION ALL

			,d.indicator_id
			,SUM(d.value) as value
		FROM _to_agg d
		WHERE NOT EXISTS (
			SELECT 1 FROM _to_agg ta
			WHERE d.parent_region_id = ta.region_id
			AND d.campaign_id = ta.campaign_id
			AND d.indicator_id = ta.indicator_id
		)
 		GROUP BY d.parent_region_id, d.campaign_id, d.indicator_id;

		CREATE UNIQUE INDEX rc_agg_ix ON _tmp_agg(region_id,campaign_id,indicator_id);
