query-80ab078399657822cbb6c779a18cb004
Propertiesinstance of (P31)part of (P361)start time (P580)performer (P175)participant (P710)
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 (COUNT(?artist) AS ?count) WHERE {
{ ?eventbroad wdt:P31 wd:Q667276.} UNION { ?eventbroad wdt:P31 wd:Q19823984.} UNION { { ?eventbroad wdt:P31 wd:Q464980.} UNION { ?eventbroad wdt:P31 wd:Q1527519.} }
{ ?event wdt:P31 ?eventbroad. } UNION { ?event wdt:P361 ?eventbroad. }. #event instance
?event rdfs:label ?eventLabel. FILTER((LANG(?eventLabel)) = "en").
OPTIONAL { ?event wdt:P580 ?eventStart.}
OPTIONAL { {?event wdt:P175 ?artist. } UNION {?event wdt:P710 ?artist. } } #usually P710 participants but P175 catches at least one event
}
GROUP BY ?eventStart ?event ?eventLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?artist"):::projected
v6("?count")
v3("?event"):::projected
v1("?eventLabel"):::projected
v4("?eventStart"):::projected
v2("?eventbroad")
c5(["wd:Q464980"]):::iri
c6(["wd:Q1527519"]):::iri
c4(["wd:Q19823984"]):::iri
c3(["wd:Q667276"]):::iri
f0[["?eventLabel = 'en'"]]
f0 --> v1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> c6
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> c5
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> c4
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> c3
end
union0r <== or ==> union0l
end
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P361"--> v2
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P31"--> v2
end
union3r <== or ==> union3l
end
v3 --"rdfs:label"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P580".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
v3 -."wdt:P710".-> v5
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P175"--> v5
end
union4r <== or ==> union4l
end
end
bind2[/"count(?artist)"/]
v5 --o bind2
bind2 --as--o v6