query-b1058e1fdef2548dd60820ea48994e4b
TODO
Use at
- https://query.wikidata.org/sparql
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#>
SELECT ?coup ?coupLabel ?success ?time ?countryLabel WHERE {
VALUES ?type {wd:Q45382 wd:Q25906438 wd:Q4460509}
?coup wdt:P31 ?type .
bind (?type != wd:Q25906438 as ?success)
?coup wdt:P17 ?country.
?country wdt:P30 wd:Q15.
optional {?coup wdt:P585 ?time}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} order by desc(?time)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?country")
v3("?coup"):::projected
v4("?success"):::projected
v1("?time"):::projected
v2("?type")
c7(["bd:serviceParam"]):::iri
c9(["en"]):::literal
c4(["wd:Q15"]):::iri
bind0[/VALUES ?type/]
bind0-->v2
bind00(["wd:Q45382"])
bind00 --> bind0
bind01(["wd:Q25906438"])
bind01 --> bind0
bind02(["wd:Q4460509"])
bind02 --> bind0
v3 --"wdt:P31"--> v2
bind1[/"?type != 'wd:Q25906438'"/]
v2 --o bind1
bind1 --as--o v4
v3 --"wdt:P17"--> v5
v5 --"wdt:P30"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P585".-> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end