query-135423da8f8ebd7b18c908ba7c0f4017
: WDQS has no insight into images held within a vi-wiki article. This query satisfies your other specification points, and in addition checks whether the wikidata item has an image starting with P. Does that help?MargaretRDonald@
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?image ?article WHERE
{
{SELECT ?item ?image ?article
WHERE
{
?article schema:about ?item ;
schema:isPartOf <https://vi.wikipedia.org/> .
?item wdt:P31 wd:Q16521 .
?item wdt:P18 ?image .
?item wdt:P5984 ?apni .
} } FILTER NOT EXISTS {
?article2 schema:about ?item ;
schema:isPartOf <https://en.wikipedia.org/> .
}
filter (contains(str(?image),"FilePath/P"))
filter (contains(str(?article),"wiki/P"))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?apni")
v1("?article"):::projected
v3("?article2")
v2("?image"):::projected
v4("?item"):::projected
c5([https://en.wikipedia.org/]):::iri
c12(["bd:serviceParam"]):::iri
c6([https://vi.wikipedia.org/]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c8(["wd:Q16521"]):::iri
f0[["contains(str(?article),'wiki/P')"]]
f0 --> v1
f1[["contains(str(?image),'FilePath/P')"]]
f1 --> v2
f2[["not "]]
subgraph f2e0["Exists Clause"]
e0v1 --"schema:about"--> e0v2
e0v1 --"schema:isPartOf"--> e0c3
e0v1("?article2"):::projected
e0v2("?item"):::projected
e0c3([https://en.wikipedia.org/]):::iri
end
f2--EXISTS--> f2e0
f2 --> v3
f2 --> c3
f2 --> v4
f2 --> c4
f2 --> c5
v3 --"schema:about"--> v4
v3 --"schema:isPartOf"--> c5
v1 --"schema:about"--> v4
v1 --"schema:isPartOf"--> c6
v4 --"wdt:P31"--> c8
v4 --"wdt:P18"--> v2
v4 --"wdt:P5984"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end