query-d74a29e0f8c37bf7ded62e6ee48350da

rq turtle/ttl

title: Deutsche Unternehmen SELECT ?name (GROUP_CONCAT(DISTINCT ?klasse; SEPARATOR = ", ") AS ?art) (GROUP_CONCAT(DISTINCT ?sitz; SEPARATOR = ", ") AS ?sitze) ?mutter ?article ?gegründet ?item WHERE { ?item (wdt:P31/(wdt:p279*)) wd:Q6881511; wdt:P17 wd:Q183; wdt:P31 ?io. OPTIONAL { ?item wdt:P749 ?ueo. } OPTIONAL { ?item wdt:P159 ?hv. } OPTIONAL { ?item wdt:P571 ?gegründet. } OPTIONAL { ?article schema:about ?item; schema:isPartOf https://de.wikipedia.org/; schema:name ?page_title. } BIND(IF(BOUND(?page_title), ?page_title, ?label) AS ?name) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?item rdfs:label ?label. ?io rdfs:label ?klasse. ?hv rdfs:label ?sitz. ?ueo rdfs:label ?mutter. } } GROUP BY ?item ?name ?mutter ?article ?gegründet ORDER BY (?name)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Deutsche Unternehmen
SELECT ?name (GROUP_CONCAT(DISTINCT ?klasse; SEPARATOR = ", ") AS ?art) (GROUP_CONCAT(DISTINCT ?sitz; SEPARATOR = ", ") AS ?sitze) ?mutter ?article ?gegründet ?item WHERE {
  ?item (wdt:P31/(wdt:p279*)) wd:Q6881511;
    wdt:P17 wd:Q183;
    wdt:P31 ?io.
  OPTIONAL { ?item wdt:P749 ?ueo. }
  OPTIONAL { ?item wdt:P159 ?hv. }
  OPTIONAL { ?item wdt:P571 ?gegründet. }
  OPTIONAL {
    ?article schema:about ?item;
      schema:isPartOf <https://de.wikipedia.org/>;
      schema:name ?page_title.
  }
  BIND(IF(BOUND(?page_title), ?page_title, ?label) AS ?name)
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
    ?item rdfs:label ?label.
    ?io rdfs:label ?klasse.
    ?hv rdfs:label ?sitz.
    ?ueo rdfs:label ?mutter.
  }
}
GROUP BY ?item ?name ?mutter ?article ?gegründet
ORDER BY (?name)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v13("?art") v7("?article"):::projected v6("?gegründet"):::projected v5("?hv") v3("?io") v2("?item"):::projected v10("?klasse"):::projected v9("?label") v12("?mutter"):::projected v9("?name"):::projected v8("?page_title") v11("?sitz"):::projected v14("?sitze") v4("?ueo") a1((" ")) c11([https://de.wikipedia.org/]):::iri c3(["wd:Q6881511"]):::iri c14(["bd:serviceParam"]):::iri c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal c5(["wd:Q183"]):::iri v2 --"wdt:P31"--> a1 a1 --"wdt:p279"--> c3 v2 --"wdt:P17"--> c5 v2 --"wdt:P31"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P749".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P159".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P571".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v7 -."schema:about".-> v2 v7 --"schema:isPartOf"--> c11 v7 --"schema:name"--> v8 end bind0[/"if(bound(?page_title),?page_title,?label)"/] v8 --o bind0 v9 --o bind0 bind0 --as--o v9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 v2 --"rdfs:label"--> v9 v3 --"rdfs:label"--> v10 v5 --"rdfs:label"--> v11 v4 --"rdfs:label"--> v12 end bind3[/"?klasse"/] v10 --o bind3 bind3 --as--o v13 bind4[/"?sitz"/] v11 --o bind4 bind4 --as--o v14