 OWNER TO oeuser;
 
 
+-- "Add Meta-documentation"
+
+COMMENT ON TABLE  orig_ego_consumption.lak_consumption_per_federalstates_per_gva IS
+'{
+"Name": "Specific electricity consumption per gross value added",
+"Source": [{
+                  "Name": "open_eGo data-processing",
+                  "URL":  "https://github.com/openego/data_processing" }],
+"Reference date": "2011",
+"Date of collection": "...",
+"Original file": "...",
+"Spatial resolution": ["Germany"],
+"Description": ["Electricity consumption of the industrial and tertiary sector divided by the respective gross value added"],
+"Column": [
+                   {"Name": "eu_code",
+                    "Description": "eu_code for nuts region",
+                    "Unit": "" },
+                   {"Name": "federal_states",
+                    "Description": "name of federal state",
+                    "Unit": "" },
+                   {"Name": "elec_consumption_industry",
+                    "Description": "specific electricity consumption per Million Euro of gva of the industrial sector",
+                    "Unit": "GWh/Million Euro" },
+                   {"Name": "elec_consumption_tertiary_sector",
+                    "Description": "specific electricity consumption per Million Euro of gva of the tertiary sector",
+                    "Unit": "GWh/Million Euro" }],
+"Changes":[
+                   {"Name": "Mario Kropshofer",
+                    "Mail": "mario.kropshofer2@stud.fh-flensburg.de",
+                    "Date":  "05.10.2016",
+                    "Comment": "..." }, 
+	  	   {"Name": "Ilka Cussmann",
+                    "Mail": "ilka.cussmann@hs-flensburg.de",
+                    "Date":  "25.10.2016",
+                    "Comment": "Completed json-String" }
+                  ],
+"ToDo": ["Add Licence"],
+"Licence": ["..."],
+"Instructions for proper use": ["..."]
+}';
+
+
 --------------
 -- Calculate electricity consumption per district based on gross value added
 --------------

	SET otg_id = b.otg_id
	FROM calc_ego_substation.ego_deu_substations b
	WHERE a.subst_id = b.subst_id; 

			  
-- Scenario eGo data processing

	ADD COLUMN otg_id integer,  
	ADD COLUMN un_id integer,
	ADD COLUMN consumption numeric, 
	ADD COLUMN numeric,
	ADD COLUMN geom geometry(MultiPolygon,3035),
	ADD COLUMN geom_centre geometry(Point,3035),
	ADD PRIMARY KEY (id);
