Commit aad0604e authored by Bjarni Pjetursson's avatar Bjarni Pjetursson
Browse files

Update 14-manglende-tilladelser-til-indvinding.sql

parent de2ae389
......@@ -7,7 +7,9 @@
SELECT
kl.longtext AS kommune,
TO_CHAR(anl.plantid)||' - '||anl.plantname AS anlaeg,
TO_CHAR(anl.participantvatno) AS cvr,
CASE WHEN anl.participantvatno IS NOT NULL THEN 'https://datacvr.virk.dk/enhed/virksomhed/'||TRIM(TO_CHAR(anl.participantvatno,'999999990')) END virk_dk,
'https://data.geus.dk/JupiterWWW/anlaeg.jsp?anlaegid='||anl.plantid AS www,
'https://data.geus.dk/tabellerkoder/tabeller.html?tablename=DRWPLANT&plantid=eq.'||anl.plantid AS detaljer_anlaeg,
vtno.companytype||' - '||vl.longtext AS virksomhedstype,
anl.vrrpurpose||' - '||ifl.longtext AS indvindingsformaal,
cp.amountperyear AS anl_tilladelse_m3,
......@@ -17,6 +19,8 @@ SELECT
ia_bo.startdate AS indtag_startdato,
ia_bo.enddate AS indtag_slutdato,
ia_bo.boreholeno AS dgunr,
'https://data.geus.dk/JupiterWWW/borerapport.jsp?borid='||ia_bo.boreholeid AS bor_www,
'https://data.geus.dk/tabellerkoder/tabeller.html?tablename=BOREHOLE&boreholeid=eq.'||ia_bo.boreholeid AS detaljer_boring,
CASE WHEN ia_bo.purpose IS NOT NULL THEN bf.longtext||' ['||ia_bo.purpose||']' END AS oprindeligt_boringsformaal,
CASE WHEN ia_bo.use IS NOT NULL THEN ba.shorttext||' ['||ia_bo.use||']' END AS aktuel_boringsanvendelse,
ia_bo.amountperyear AS bor_tilladelse_m3,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment