query-88d7e6835b704268e026ecb8b75b1432
But it ends in a ‘TimeoutException Error’. Is there a better syntax/coding for this purpose? Note that if one targets more the articles in language A, the query provides results. For instance, articles about locomotives:
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 ?itemLabel ?sitelink WHERE {
?item wdt:P31 wd:Q19832486. # Locomotive
?sitelink schema:isPartOf <https://it.wikipedia.org/>;
schema:about ?item;
wikibase:badge wd:Q17437796 . # Featured Article
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } .
FILTER NOT EXISTS {
?article schema:about ?item .
?article schema:isPartOf <https://fr.wikipedia.org/> . # Existing article on frwiki for the item.
}
} ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?article")
v3("?item")
v1("?itemLabel"):::projected
v4("?sitelink"):::projected
c10(["bd:serviceParam"]):::iri
c3([https://fr.wikipedia.org/]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c6([https://it.wikipedia.org/]):::iri
c5(["wd:Q19832486"]):::iri
c8(["wd:Q17437796"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"schema:about"--> e0v2
e0v1 --"schema:isPartOf"--> e0c3
e0v1("?article"):::projected
e0v2("?item"):::projected
e0c3([https://fr.wikipedia.org/]):::iri
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
f0 --> c2
f0 --> c3
v2 --"schema:about"--> v3
v2 --"schema:isPartOf"--> c3
v3 --"wdt:P31"--> c5
v4 --"schema:isPartOf"--> c6
v4 --"schema:about"--> v3
v4 --"wikibase:badge"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end