query-ead0f01aab9cdd85e7e81eaaad2f5452
Ermittler-Serien
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?series ?seriesLabel ?placeLabel (GROUP_CONCAT(DISTINCT(?investigatorName);separator=", ") AS ?investigators) (COUNT(DISTINCT(?film)) AS ?count) (GROUP_CONCAT(DISTINCT(?investigatorOldName);separator=", ") AS ?investigatorsOld) WHERE {
?series wdt:P361 wd:Q689438
OPTIONAL{?film wdt:P179 ?series}
OPTIONAL{?series wdt:P840 ?place}
OPTIONAL{?series wdt:P144 ?investigatorOld . ?investigatorOld rdfs:label ?investigatorOldName . FILTER(lang(?investigatorOldName) = "de")}
OPTIONAL{?series wdt:P674 ?investigator . ?investigator rdfs:label ?investigatorName . FILTER(lang(?investigatorName) = "de")}
SERVICE wikibase:label{bd:serviceParam wikibase:language "de"}
}
GROUP BY ?series ?seriesLabel ?place ?placeLabel
ORDER BY DESC(?count) ?seriesLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v11("?count")
v6("?film"):::projected
v9("?investigator")
v3("?investigatorName"):::projected
v8("?investigatorOld")
v4("?investigatorOldName"):::projected
v10("?investigators")
v11("?investigatorsOld")
v7("?place")
v5("?series"):::projected
v2("?seriesLabel"):::projected
c1(["de"]):::literal
c10(["bd:serviceParam"]):::iri
c3(["wd:Q689438"]):::iri
v5 --"wdt:P361"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v6 -."wdt:P179".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P840".-> v7
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P144".-> v8
v8 --"rdfs:label"--> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P674".-> v9
v9 --"rdfs:label"--> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c1
end
bind3[/"?investigatorName"/]
v3 --o bind3
bind3 --as--o v10
bind4[/"count(?film)"/]
v6 --o bind4
bind4 --as--o v11
bind5[/"?investigatorOldName"/]
v4 --o bind5
bind5 --as--o v11