query-25e0e7d496aa6ab7f60b9e6751281fcc
Tatort episodes with Batic and Leitmayr
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
SELECT (MIN(?publication) AS ?aired) ?case ?ordinal ?film ?title (GROUP_CONCAT(DISTINCT(?screenwriter);separator=", ") AS ?screenwriters) (GROUP_CONCAT(DISTINCT(?director);separator=", ") AS ?directors) (SAMPLE(?runtime) AS ?runtime) (SAMPLE(?imdb) AS ?imdb) WHERE {
?film p:P179 ?series . ?series v:P179 wd:Q689438 . ?series pq:P1545 ?ordinal .
?film p:P179 ?batic . ?batic v:P179 wd:Q110737643 . ?batic pq:P1545 ?case .
?film wdt:P1476 ?title
OPTIONAL{?film wdt:P57 ?dir . ?dir rdfs:label ?director . FILTER(lang(?director) = "de")}
OPTIONAL{?film wdt:P58 ?screen . ?screen rdfs:label ?screenwriter . FILTER(lang(?screenwriter) = "de")}
OPTIONAL{?film wdt:P345 ?imdb}
OPTIONAL{?film wdt:P577 ?publication}
OPTIONAL{?film wdt:P2047 ?runtime}
}
GROUP BY ?film ?title ?ordinal ?case
ORDER BY ASC(xsd:integer(?ordinal))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v14("?aired")
v6("?batic")
v7("?case"):::projected
v9("?dir")
v3("?director"):::projected
v16("?directors")
v4("?film"):::projected
v17("?imdb"):::projected
v1("?ordinal"):::projected
v12("?publication"):::projected
v17("?runtime"):::projected
v10("?screen")
v2("?screenwriter"):::projected
v15("?screenwriters")
v5("?series")
v8("?title"):::projected
c4(["wd:Q689438"]):::iri
c6(["wd:Q110737643"]):::iri
v4 --"p:P179"--> v5
v5 --"p:statement/P179"--> c4
v5 --"p:qualifier/P1545"--> v1
v4 --"p:P179"--> v6
v6 --"p:statement/P179"--> c6
v6 --"p:qualifier/P1545"--> v7
v4 --"p:direct/P1476"--> v8
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P57".-> v9
v9 --"rdfs:label"--> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P58".-> v10
v10 --"rdfs:label"--> v2
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P345".-> v17
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P577".-> v12
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P2047".-> v17
end
bind5[/"min(?publication)"/]
v12 --o bind5
bind5 --as--o v14
bind6[/"?screenwriter"/]
v2 --o bind6
bind6 --as--o v15
bind7[/"?director"/]
v3 --o bind7
bind7 --as--o v16
bind8[/"sample(?runtime)"/]
v17 --o bind8
bind8 --as--o v17
bind9[/"sample(?imdb)"/]
v17 --o bind9
bind9 --as--o v17