query-bfb160c8f03c13abf41a16d587124f46
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 ?item ?itemLabel ?sitelinks WHERE
{
{SELECT ?sitelinks
WHERE
{
?number wdt:P31 wd:Q21199 .
?number wdt:P1181 ?num .
bind(xsd:integer(?num) as ?sitelinks)
filter (?sitelinks >300)
filter (?sitelinks <402)
} } ?item wikibase:sitelinks ?sitelinks .
FILTER NOT EXISTS {?item wdt:P31 wd:Q5 .}
FILTER NOT EXISTS {?item wdt:P8419 [] .}
FILTER NOT EXISTS {?item wdt:P31/wdt:P279* wd:Q17442446 . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY DESC(?sitelinks)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v4("?num")
v3("?number")
v5("?sitelinks"):::projected
a2((" "))
a1((" "))
c8(["wd:Q21199"]):::iri
c3(["wd:Q17442446"]):::iri
c12(["bd:serviceParam"]):::iri
c5(["wd:Q5"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P31"--> e0a1
e0a1 --"wdt:P279"--> e0c3
e0v1("?item"):::projected
e0a1((" ")):::projected
e0c3(["wd:Q17442446"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> a1
f0 --> c2
f0 --> c3
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"wdt:P8419"--> e1a1
e1v1("?item"):::projected
e1a1((" ")):::projected
end
f1--EXISTS--> f1e1
f1 --> v2
f1 --> c4
f1 --> a2
v2 --"wdt:P8419"--> a2
f2[["not "]]
subgraph f2e2["Exists Clause"]
e2v1 --"wdt:P31"--> e2c2
e2v1("?item"):::projected
e2c2(["wd:Q5"]):::iri
end
f2--EXISTS--> f2e2
f2 --> v2
f2 --> c1
f2 --> c5
v2 --"wdt:P31"--> c5
f3[["?sitelinks < '402^^xsd:integer'"]]
f3 --> v5
f4[["?sitelinks > '300^^xsd:integer'"]]
f4 --> v5
v3 --"wdt:P31"--> c8
v3 --"wdt:P1181"--> v4
bind5[/"http://www.w3.org/2001/XMLSchema#integer(?num)"/]
v4 --o bind5
bind5 --as--o v5
v2 --"wikibase:sitelinks"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end