query-8117e37410ae5d5ca383a3ffcd180e46
How to select English OR most popular non-English language Wikipedia article?Is it possible to query the equivalent of 1. Get English Wikipedia link if it exists, 2. otherwise get the most popular non-English Wikipedia article Something like > . OR IF THAT DOESN'T EXIST, ?link (by most popular / longest article / most edits / etc?) *.wikipedia.org https://en.wikipedia.org/ ?link schema:isPartOf <That could be in a query like this,
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?itemLabel ?sitelink ?Instagram_username WHERE {
?item wdt:P2003 ?Instagram_username.
?sitelink schema:about ?item.
?sitelink schema:isPartOf <https://en.wikipedia.org/>.
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;
v2("?Instagram_username"):::projected
v1("?item"):::projected
v3("?sitelink"):::projected
c4([https://en.wikipedia.org/]):::iri
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P2003"--> v2
v3 --"schema:about"--> v1
v3 --"schema:isPartOf"--> c4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end