query-6ef3be062857e07006ac6b9d30b6ccb8
Propertiesinstance of (P31)country of citizenship (P27)
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 bd: <http://www.bigdata.com/rdf#>
PREFIX schema: <http://schema.org/>
SELECT ?item ?itemLabel ?numLinks ?who
WHERE
{
?item wdt:P31 wd:Q5.
?item wdt:P27 wd:Q145. # citizen of the UK
?item wikibase:sitelinks ?numLinks.
?item schema:description ?who.
FILTER (LANG(?who) = "en") # also must have an English description
FILTER ( ?numLinks >= 5)
MINUS {
?article schema:about ?item.
?article schema:isPartOf <https://en.wikipedia.org/>} # page doesn't exist in English Wikipedia
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY DESC (?numLinks)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?article")
v3("?item"):::projected
v1("?numLinks"):::projected
v2("?who"):::projected
c11([https://en.wikipedia.org/]):::iri
c13(["bd:serviceParam"]):::iri
c4(["wd:Q5"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c6(["wd:Q145"]):::iri
f0[["?numLinks >= '5^^xsd:integer'"]]
f0 --> v1
f1[["?who = 'en'"]]
f1 --> v2
v3 --"wdt:P31"--> c4
v3 --"wdt:P27"--> c6
v3 --"wikibase:sitelinks"--> v1
v3 --"schema:description"--> v2
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v4 --"schema:about"--> v3
v4 --"schema:isPartOf"--> c11
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end