query-7ef754fc2c21bc9aabd1aace7a98d9b8
TODO
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?itemLabel ?linkcount
where {
{
select ?item ?itemLabel ?sitelink WHERE
{
?item wdt:P31 wd:Q5 .
?sitelink schema:about ?item .
?sitelink schema:isPartOf <https://simple.wikipedia.org/> .
}
} FILTER NOT EXISTS { ?wfr schema:about ?item . ?wfr schema:inLanguage "en". }
OPTIONAL {?item rdfs:label ?itemLabel. filter(lang(?itemLabel)="en")}
OPTIONAL {?item wikibase:sitelinks ?linkcount .}
}
ORDER BY DESC(?linkcount)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v4("?itemLabel"):::projected
v1("?linkcount"):::projected
v5("?sitelink")
v2("?wfr")
c5(["wd:Q5"]):::iri
c3(["en"]):::literal
c7([https://simple.wikipedia.org/]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"schema:about"--> e0v2
e0v1 --"schema:inLanguage"--> e0c3
e0v2("?item"):::projected
e0v1("?wfr"):::projected
e0c3(["en"]):::literal
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
f0 --> c2
f0 --> c3
v2 --"schema:about"--> v3
v2 --"schema:inLanguage"--> c3
v3 --"wdt:P31"--> c5
v5 --"schema:about"--> v3
v5 --"schema:isPartOf"--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."rdfs:label".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wikibase:sitelinks".-> v1
end