query-2e4f1a45f61e7778b42ba82be3ed7898
.on Mastodon and on TwitterOriginally posted
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Timeline
SELECT ?coup ?coupLabel (MIN(?date) AS ?date_) (SAMPLE(?image) AS ?image_) WHERE {
?coup wdt:P31/wdt:P279* wd:Q45382;
wdt:P585 ?date.
FILTER(?date >= "2001-00-00"^^xsd:date
&& ?date < "2101-00-00"^^xsd:dat)
OPTIONAL { ?coup wdt:P18 ?image. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?coup ?coupLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?coup"):::projected
v1("?date"):::projected
v4("?date_")
v3("?image"):::projected
v5("?image_")
a1((" "))
c5(["wd:Q45382"]):::iri
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?date >= '2001-00-00^^xsd:date'?date < s2101-00-00^^<http://www.w3.org/2001/XMLSchema#dat>'"]]
f0 --> v1
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
v2 --"wdt:P585"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind3[/"min(?date)"/]
v1 --o bind3
bind3 --as--o v4
bind4[/"sample(?image)"/]
v3 --o bind4
bind4 --as--o v5