query-e915950fe6f607ff2b4f4778404f878c
Dänen auf dewiki
Use at
- https://query.wikidata.org/sparql
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#>
#defaultView:Table
#title: Dänen auf dewiki
SELECT ?item ?page_title ?article (GROUP_CONCAT(DISTINCT ?klasse; SEPARATOR = ", ") AS ?ist) (GROUP_CONCAT(DISTINCT ?beruf;separator=", ") as ?tätigkeit) ?dawiki ?dsdid WHERE {
?item wdt:P27 wd:Q35;
wdt:P31 ?instance.
?article schema:about ?item;
schema:isPartOf <https://de.wikipedia.org/>;
schema:name ?page_title.
OPTIONAL { ?item wdt:P625 ?location. }
OPTIONAL {
?dawiki schema:about ?item;
schema:isPartOf <https://da.wikipedia.org/>;
schema:name ?da_title.
}
OPTIONAL { ?item wdt:P21 ?gender. }
OPTIONAL { ?item wdt:P106 ?occupation. }
OPTIONAL { ?item wdt:P8313 ?dsdid. }
FILTER(BOUND(?dawiki))
FILTER(BOUND(?instance))
BIND(IF(?instance = wd:Q5, ?gender, ?instance) AS ?cl)
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?cl rdfs:label ?klasse.
?gender rdfs:label ?geschlecht.
?occupation rdfs:label ?beruf.
}
}
GROUP BY ?item ?page_title ?article ?dawiki ?dsdid
ORDER BY (?page_title)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?article"):::projected
v14("?beruf"):::projected
v11("?cl")
v7("?da_title")
v3("?dawiki"):::projected
v10("?dsdid"):::projected
v8("?gender")
v13("?geschlecht")
v2("?instance")
v15("?ist")
v4("?item"):::projected
v12("?klasse"):::projected
v6("?location")
v9("?occupation")
v1("?page_title"):::projected
v16("?tätigkeit")
c6([https://de.wikipedia.org/]):::iri
c2(["wd:Q35"]):::iri
c14(["bd:serviceParam"]):::iri
c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c9([https://da.wikipedia.org/]):::iri
f0[["bound(?instance)"]]
f0 --> v2
f1[["bound(?dawiki)"]]
f1 --> v3
v4 --"wdt:P27"--> c2
v4 --"wdt:P31"--> v2
v5 --"schema:about"--> v4
v5 --"schema:isPartOf"--> c6
v5 --"schema:name"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P625".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."schema:about".-> v4
v3 --"schema:isPartOf"--> c9
v3 --"schema:name"--> v7
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P21".-> v8
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P106".-> v9
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P8313".-> v10
end
bind2[/"if(?instance = 'wd:Q5',?gender,?instance)"/]
v2 --o bind2
v8 --o bind2
bind2 --as--o v11
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
v11 --"rdfs:label"--> v12
v8 --"rdfs:label"--> v13
v9 --"rdfs:label"--> v14
end
bind5[/"?klasse"/]
v12 --o bind5
bind5 --as--o v15
bind6[/"?beruf"/]
v14 --o bind6
bind6 --as--o v16