query-01c239f0ac97bfb4c294d155c24b43f5
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
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 ?image WHERE {
?item wdt:P17 wd:Q38 .
?item wdt:P2186 ?wlmid .
MINUS { ?item wdt:P18 ?image } .
BIND(CONCAT('"Wiki Loves Monuments Italia" insource:', ?wlmid) AS ?needle ) .
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
bd:serviceParam wikibase:api "Search" .
bd:serviceParam mwapi:srnamespace "6" .
bd:serviceParam mwapi:srsearch ?needle .
bd:serviceParam mwapi:srlimit "1" .
?image wikibase:apiOutput mwapi:title .
}
}
LIMIT 50
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?image"):::projected
v1("?item"):::projected
v4("?needle")
v2("?wlmid")
c2(["wd:Q38"]):::iri
c15(["1"]):::literal
c6(["bd:serviceParam"]):::iri
c12(["6"]):::literal
c10(["Search"]):::literal
c17(["mwapi:title"]):::iri
c8(["commons.wikimedia.org"]):::literal
v1 --"wdt:P17"--> c2
v1 --"wdt:P2186"--> v2
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P18"--> v3
end
bind1[/"concat('"Wiki Loves Monuments Italia" insource:',?wlmid)"/]
v2 --o bind1
bind1 --as--o v4
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c6 --"mwapi:endpoint"--> c8
c6 --"mwapi:api"--> c10
c6 --"mwapi:srnamespace"--> c12
c6 --"mwapi:srsearch"--> v4
c6 --"mwapi:srlimit"--> c15
v3 --"mwapi:apiOutput"--> c17
end