query-f0f807434668fd1bfc1dc42e5009026d
Propertiesinstance of (P31)part of (P361)start time (P580)participant (P710)movement (P135)genre (P136)
Use at
- https://query.wikidata.org/sparql
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#>
#defaultView:Timeline
SELECT DISTINCT ?eventStart ?event ?eventLabel ?whatField WHERE {
{ ?event wdt:P31 wd:Q72823. } UNION { ?event wdt:P361 wd:Q72823. } #documenta instance
?event rdfs:label ?eventLabel. FILTER((LANG(?eventLabel)) = "en").
?event wdt:P580 ?eventStart.
?event wdt:P710 ?artist. #participating artist
optional { ?artist wdt:P135 ?mvt. ?mvt rdfs:label ?mvtLabel. FILTER((LANG(?mvtLabel)) = "en")}.
optional { ?artist wdt:P136 ?agenre. ?agenre rdfs:label ?genreLabel. FILTER((LANG(?genreLabel)) = "en")}.
BIND(IF(BOUND(?mvtLabel),?mvtLabel,?genreLabel) AS ?whatField).
}
ORDER BY ?eventStart ?whatField
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v9("?agenre")
v7("?artist")
v6("?event"):::projected
v4("?eventLabel"):::projected
v1("?eventStart"):::projected
v3("?genreLabel")
v8("?mvt")
v5("?mvtLabel")
v10("?whatField"):::projected
c3(["wd:Q72823"]):::iri
f0[["?eventLabel = 'en'"]]
f0 --> v4
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v6 --"wdt:P361"--> c3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v6 --"wdt:P31"--> c3
end
union0r <== or ==> union0l
end
v6 --"rdfs:label"--> v4
v6 --"wdt:P580"--> v1
v6 --"wdt:P710"--> v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v7 -."wdt:P135".-> v8
v8 --"rdfs:label"--> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v7 -."wdt:P136".-> v9
v9 --"rdfs:label"--> v3
end
bind1[/"if(bound(?mvtLabel),?mvtLabel,?genreLabel)"/]
v5 --o bind1
v3 --o bind1
bind1 --as--o v10