 (
 	id integer NOT NULL,
 	subst_id integer,
+	otg_id integer,
+	un_id integer,
  	sector_area_residential numeric,
 	sector_area_retail numeric,
 	sector_area_industrial numeric,

WHERE
sub.id = a.id;

-- Add Geometry information to consumption table

ALTER TABLE calc_ego_loads.ego_deu_consumption
ADD COLUMN geom geometry (Polygon,3035); 

UPDATE calc_ego_loads.ego_deu_consumption a
SET geom = b.geom
FROM calc_ego_loads.ego_deu_load_area b
WHERE a.id = b.id;

-- Grant oeuser   (OK!) -> 100ms =0
GRANT ALL ON TABLE 	calc_ego_loads.ego_deu_consumption TO oeuser WITH GRANT OPTION;

	sector_consumption_retail numeric,
	sector_consumption_industrial numeric,
	sector_consumption_agricultural numeric,
	geom geometry (Polygon,3035), 
	CONSTRAINT ego_deu_consumption_pkey PRIMARY KEY (id)
);

-- Set ID   (OK!) -> 100ms =206.846
INSERT INTO 	calc_ego_loads.ego_deu_consumption (id,subst_id,
		sector_area_residential,sector_area_retail,
		sector_area_industrial,sector_area_agricultural)
	SELECT 		id,
			subst_id,
			sector_area_residential,
			sector_area_retail,
