query-fddd2855e8a43b2412281eba9293d27a
Tatort episodes
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 ?ordinal (MIN(?publication) AS ?aired) ?film ?title (GROUP_CONCAT(DISTINCT(?investigatorName);separator=", ") AS ?investigators) (GROUP_CONCAT(DISTINCT(?directorName);separator=", ") AS ?directors)(GROUP_CONCAT(DISTINCT(?screenwriter);separator=", ") AS ?screenwriters) (SAMPLE(?runtime) AS ?runtime) (SAMPLE(?imdb) AS ?imdb) WHERE {
?film p:P179 ?series . ?series v:P179 wd:Q689438 . ?series pq:P1545 ?ordinal . FILTER(xsd:integer(?ordinal)<10000)
OPTIONAL{?film wdt:P1476 ?title}
OPTIONAL{?film wdt:P57 ?dir . ?dir rdfs:label ?directorName . FILTER(lang(?directorName) = "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}
OPTIONAL{?film p:P161 ?cast . ?cast pq:P453 ?investigator . ?investigator wdt:P31 wd:Q110857263 . ?investigator rdfs:label ?investigatorName . FILTER(lang(?investigatorName) = "de")}
}
GROUP BY ?film ?title ?ordinal
ORDER BY DESC(xsd:integer(?ordinal))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v15("?aired")
v13("?cast")
v8("?dir")
v4("?directorName"):::projected
v17("?directors")
v5("?film"):::projected
v19("?imdb"):::projected
v14("?investigator")
v2("?investigatorName"):::projected
v16("?investigators")
v1("?ordinal"):::projected
v11("?publication"):::projected
v19("?runtime"):::projected
v9("?screen")
v3("?screenwriter"):::projected
v18("?screenwriters")
v6("?series")
v7("?title"):::projected
c17(["wd:Q110857263"]):::iri
c5(["wd:Q689438"]):::iri
f0[["http://www.w3.org/2001/XMLSchema#integer(?ordinal) < '10000^^xsd:integer'"]]
f0 --> v1
v5 --"p:P179"--> v6
v6 --"p:statement/P179"--> c5
v6 --"p:qualifier/P1545"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P1476".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P57".-> v8
v8 --"rdfs:label"--> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P58".-> v9
v9 --"rdfs:label"--> v3
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P345".-> v19
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P577".-> v11
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P2047".-> v19
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:P161".-> v13
v13 --"p:qualifier/P453"--> v14
v14 --"p:direct/P31"--> c17
v14 --"rdfs:label"--> v2
end
bind7[/"min(?publication)"/]
v11 --o bind7
bind7 --as--o v15
bind8[/"?investigatorName"/]
v2 --o bind8
bind8 --as--o v16
bind9[/"?directorName"/]
v4 --o bind9
bind9 --as--o v17
bind10[/"?screenwriter"/]
v3 --o bind10
bind10 --as--o v18
bind11[/"sample(?runtime)"/]
v19 --o bind11
bind11 --as--o v19
bind12[/"sample(?imdb)"/]
v19 --o bind12
bind12 --as--o v19