query-78151231a819668b7ff6efed59282e8b
As a more efficient way to select labels, I tried the above approach. It works, but mostly because there are just 50k items with a sitelink to enwiki from family name. The same approach with dab pages fails (300k items to start with, see below). Obviously, either miss items when the Wikipedia article is named differently.
Use at
- https://query.wikidata.org/sparql
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 * WHERE
{
?dab wdt:P31 wd:Q4167410 ; ^ schema:about [ schema:name ?l; schema:isPartOf <https://en.wikipedia.org/> ] .
?item wdt:P31 wd:Q101352 ; rdfs:label ?l.
MINUS { ?item wdt:P1889 [] }
FILTER( ?dab != ?item)
}
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?dab"):::projected
v2("?item"):::projected
v3("?l"):::projected
a2((" "))
a1((" "))
c5([https://en.wikipedia.org/]):::iri
c7(["wd:Q101352"]):::iri
c2(["wd:Q4167410"]):::iri
f0[["?dab != ?item"]]
f0 --> v1
f0 --> v2
v1 --"wdt:P31"--> c2
a1 --"schema:name"--> v3
a1 --"schema:isPartOf"--> c5
a1 --"schema:about"--> v1
v2 --"wdt:P31"--> c7
v2 --"rdfs:label"--> v3
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P1889"--> a2
end