query-0d941550bd8140be1009f4f55b0581d2
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 DISTINCT ?item ?itemLabel ?image ?imageLabel ?mapcatLabel WHERE {
?item wdt:P31 wd:Q3624078 . # Sovereign State
?item wdt:P242 ?image . # Locator Map Image (so far, so good)
# RETURN ONLY THE ORTHOGRAPHIC PROJECTION VERSION OF EACH MAP
# ?item wdt:P7867 ?mapcat # wrong cat
# ?image wdt:P242 wd:Q1753242 . # fail
# filter exists (?item wdt:P242 wd:Q1753242) #fail
filter CONTAINS(str(?image), "orthographic"). #fail
#not a former country
FILTER NOT EXISTS {?item wdt:P31 wd:Q3024240} .
#and no an ancient civilisation (needed to exclude ancient Egypt)
FILTER NOT EXISTS {?item wdt:P31 wd:Q28171280} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} LIMIT 30
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?image"):::projected
v1("?item"):::projected
c2(["wd:Q28171280"]):::iri
c3(["wd:Q3024240"]):::iri
c5(["wd:Q3624078"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P31"--> e0c2
e0v1("?item"):::projected
e0c2(["wd:Q28171280"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> c2
v1 --"wdt:P31"--> c2
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"wdt:P31"--> e1c2
e1v1("?item"):::projected
e1c2(["wd:Q3024240"]):::iri
end
f1--EXISTS--> f1e1
f1 --> v1
f1 --> c1
f1 --> c3
v1 --"wdt:P31"--> c3
f2[["contains(str(?image),'orthographic')"]]
f2 --> v2
v1 --"wdt:P31"--> c5
v1 --"wdt:P242"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end