query-470e8973751d8d2cf2e0e10119831140

rq turtle/ttl

Propertiesinstance of (P31)German regional key (P1388)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?art ?regio
WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en". }
  {?item wdt:P31 wd:Q41762994;
  OPTIONAL {?item wdt:P1388 ?regio}.
  BIND("GVV" as ?art).}
  union
  {?item wdt:P31 wd:Q1561418;
  OPTIONAL {?item wdt:P1388 ?regio}.
  BIND("VVG" as ?art).}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?art"):::projected v1("?item"):::projected v2("?regio"):::projected c2(["bd:serviceParam"]):::iri c8(["wd:Q1561418"]):::iri c4(["de,en"]):::literal c6(["wd:Q41762994"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1388".-> v2 end bind0[/"'VVG'"/] bind0 --as--o v4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c6 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1388".-> v2 end bind1[/"'GVV'"/] bind1 --as--o v4 end union0r <== or ==> union0l end