query-1c73e1341c28b5efd9f838b19fb081a5
Einzelabfrage für den "Virtuellen Rundgang"
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX target: <http://www.wikidata.org/entity/Q115831>
SELECT ?label ?desc ?dod ?dodPrecision ?dob ?dobPrecision ?poDLabel ?poBLabel ?relLabel ?orderLabel ?hlsId ?gndId ?wpPage ?child ?childLabel ?father ?fatherLabel ?mother ?motherLabel ?relative ?relativeLabel ?kinshipLabel ?occupColl ?occupCollLabel (GROUP_CONCAT(?occupLabel; separator=", ") AS ?occupation) WHERE {
target: rdfs:label ?label.
FILTER((LANG(?label)) = "de")
target: schema:description ?desc.
FILTER((LANG(?desc)) = "de")
#Biographische Daten - Geburtsort/datum, Sterbeortdatum, Beruf, Religion, rel. Orden
OPTIONAL { target: p:P569/psv:P569[wikibase:timePrecision ?dobPrecision; wikibase:timeValue ?dob] }
OPTIONAL { target: p:P570/psv:P570[wikibase:timePrecision ?dodPrecision; wikibase:timeValue ?dod] }
OPTIONAL { target: wdt:P19 ?poB. ?poB rdfs:label ?poBLabel. FILTER (LANG(?poBLabel) = "de")}
OPTIONAL { target: wdt:P20 ?poD. ?poD rdfs:label ?poDLabel. FILTER (LANG(?poDLabel) = "de")}
OPTIONAL { target: wdt:P106 ?occup.}
OPTIONAL { target: wdt:P140 ?rel. ?rel rdfs:label ?relLabel. FILTER (LANG(?relLabel) = "de") }
OPTIONAL { target: wdt:P611 ?order. ?order rdfs:label ?orderLabel. FILTER (LANG(?orderLabel) = "de") }
#OPTIONAL { target: wdt:P39 ?position. ?position rdfs:label ?positionLabel. FILTER (LANG(?positionLabel) = "de")}
# Identifier, Wikipedia
OPTIONAL { target: wdt:P902 ?hlsId. }
OPTIONAL { target: wdt:P227 ?gndId. }
OPTIONAL { ?wpPage schema:about target:; schema:isPartOf <https://de.wikipedia.org/> }
# Verwandte die ebenfalls in der Porträtgalerie hängen
OPTIONAL { target: wdt:P40 ?child. ?child wdt:P1343 wd:Q112578667. ?child rdfs:label ?childLabel. FILTER (LANG(?childLabel) = "de") }
OPTIONAL { target: wdt:P22 ?father. ?father wdt:P1343 wd:Q112578667. ?father rdfs:label ?fatherLabel. FILTER (LANG(?fatherLabel) = "de") }
OPTIONAL { target: wdt:P25 ?mother. ?mother wdt:P1343 wd:Q112578667. ?mother rdfs:label ?motherLabel. FILTER (LANG(?motherLabel) = "de")}
## Andere Verwandte
OPTIONAL {
target: wdt:P1343 wd:Q112578667;
p:P1038 ?relativeStmt.
?relativeStmt ps:P1038 ?relative;
pq:P1039 ?kinship.
?relative wdt:P1343 wd:Q112578667.
?relative rdfs:label ?relativeLabel. FILTER(LANG(?relativeLabel)="de").
?kinship rdfs:label ?kinshipLabel. FILTER(LANG(?kinshipLabel)="de").
}
# Personen der Galerie mit gleicher Occupation
OPTIONAL { ?occupColl wdt:P106 ?occup.
FILTER(?occupColl != target:)
?occupColl wdt:P1343 wd:Q112578667.
?occupColl rdfs:label ?occupCollLabel. FILTER (LANG(?occupCollLabel) = "de")
?occup rdfs:label ?occupLabel. FILTER (LANG(?occupLabel) = "de")}
}
GROUP BY ?label ?desc ?dod ?dodPrecision ?dob ?dobPrecision ?poDLabel ?poBLabel ?relLabel ?orderLabel ?hlsId ?gndId ?wpPage ?child ?childLabel ?father ?fatherLabel ?mother ?motherLabel ?relative ?relativeLabel ?kinshipLabel ?occupColl ?occupCollLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v27("?child"):::projected
v8("?childLabel"):::projected
v13("?desc"):::projected
v16("?dob"):::projected
v15("?dobPrecision"):::projected
v18("?dod"):::projected
v17("?dodPrecision"):::projected
v28("?father"):::projected
v7("?fatherLabel"):::projected
v25("?gndId"):::projected
v24("?hlsId"):::projected
v32("?kinship")
v5("?kinshipLabel"):::projected
v14("?label"):::projected
v29("?mother"):::projected
v6("?motherLabel"):::projected
v21("?occup")
v1("?occupColl"):::projected
v2("?occupCollLabel"):::projected
v3("?occupLabel"):::projected
v33("?occupation")
v23("?order")
v9("?orderLabel"):::projected
v19("?poB")
v12("?poBLabel"):::projected
v20("?poD")
v11("?poDLabel"):::projected
v22("?rel")
v10("?relLabel"):::projected
v31("?relative"):::projected
v4("?relativeLabel"):::projected
v30("?relativeStmt")
v26("?wpPage"):::projected
a2((" "))
a1((" "))
a4((" "))
a3((" "))
c20([https://de.wikipedia.org/]):::iri
c23(["wd:Q112578667"]):::iri
c1(["wd:Q115831"]):::iri
f0[["?desc = 'de'"]]
f0 --> v13
f1[["?label = 'de'"]]
f1 --> v14
c1 --"rdfs:label"--> v14
c1 --"schema:description"--> v13
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a1 -."wikibase:timePrecision".-> v15
a1 --"wikibase:timeValue"--> v16
c1 --"p:P569"--> a2
a2 --"p:statement/value/P569"--> a1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
a3 -."wikibase:timePrecision".-> v17
a3 --"wikibase:timeValue"--> v18
c1 --"p:P570"--> a4
a4 --"p:statement/value/P570"--> a3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P19".-> v19
v19 --"rdfs:label"--> v12
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P20".-> v20
v20 --"rdfs:label"--> v11
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P106".-> v21
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P140".-> v22
v22 --"rdfs:label"--> v10
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P611".-> v23
v23 --"rdfs:label"--> v9
end
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P902".-> v24
end
subgraph optional8["(optional)"]
style optional8 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P227".-> v25
end
subgraph optional9["(optional)"]
style optional9 fill:#bbf,stroke-dasharray: 5 5;
v26 -."schema:about".-> c1
v26 --"schema:isPartOf"--> c20
end
subgraph optional10["(optional)"]
style optional10 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P40".-> v27
v27 --"p:direct/P1343"--> c23
v27 --"rdfs:label"--> v8
end
subgraph optional11["(optional)"]
style optional11 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P22".-> v28
v28 --"p:direct/P1343"--> c23
v28 --"rdfs:label"--> v7
end
subgraph optional12["(optional)"]
style optional12 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P25".-> v29
v29 --"p:direct/P1343"--> c23
v29 --"rdfs:label"--> v6
end
subgraph optional13["(optional)"]
style optional13 fill:#bbf,stroke-dasharray: 5 5;
c1 -."p:direct/P1343".-> c23
c1 --"p:P1038"--> v30
v30 --"p:statement/P1038"--> v31
v30 --"p:qualifier/P1039"--> v32
v31 --"p:direct/P1343"--> c23
v31 --"rdfs:label"--> v4
v32 --"rdfs:label"--> v5
end
subgraph optional14["(optional)"]
style optional14 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P106".-> v21
v1 --"p:direct/P1343"--> c23
v1 --"rdfs:label"--> v2
v21 --"rdfs:label"--> v3
end
bind3[/"?occupLabel"/]
v3 --o bind3
bind3 --as--o v33