GOV/Datenauswertung: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Keine Bearbeitungszusammenfassung |
(+ Hierarchie) |
||
Zeile 1: | Zeile 1: | ||
[[GOV|GOV-Hauptseite]] > [[GOV/Projekt]] > GOV-Datenauswertung | |||
== Liste aller Ortsnamen in einem Kreis == | == Liste aller Ortsnamen in einem Kreis == | ||
SELECT c.textualId, n.content, n.language, type_names.value | SELECT c.textualId, n.content, n.language, type_names.value |
Version vom 12. Oktober 2008, 12:07 Uhr
GOV-Hauptseite > GOV/Projekt > GOV-Datenauswertung
Liste aller Ortsnamen in einem Kreis
SELECT c.textualId, n.content, n.language, type_names.value FROM GovItem i JOIN p ON p.ende=i.id JOIN GovItem c ON p.anfang=c.id AND c.deleted=0 LEFT JOIN Property n ON n.gov_object=c.id AND n.type=1 LEFT JOIN Property t ON t.gov_object=c.id AND t.type=2 JOIN type_names ON type_names.type_id=t.typeObject AND type_names.language='deu' WHERE i.textualId ='adm_169761'
Liste aller Ortsnamen in einem Regierungsbezirk mit Kreisen
SELECT i.textualId as Kreis, c.textualId as Ort, n.content as Name, n.language as Sprache, type_names.value as Typ FROM GovItem i2 JOIN p p2 ON p2.ende=i2.id AND p2.laenge=1 JOIN GovItem i ON p2.anfang=i.id JOIN p ON p.ende=i.id JOIN GovItem c ON p.anfang=c.id AND c.deleted=0 LEFT JOIN Property n ON n.gov_object=c.id AND n.type=1 LEFT JOIN Property t ON t.gov_object=c.id AND t.type=2 JOIN type_names ON type_names.type_id=t.typeObject AND type_names.language='deu' WHERE i2.textualId ='adm_368468'