Last active
September 15, 2022 21:13
-
-
Save DavidMoraisFerreira/d2f5f07ad56bbaa18b7fa03fe5323223 to your computer and use it in GitHub Desktop.
Find Luxembourgish citizens on Wikidata without a family name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX schema: <http://schema.org/> | |
PREFIX wd: <http://www.wikidata.org/entity/> | |
PREFIX wdt: <http://www.wikidata.org/prop/direct/> | |
SELECT DISTINCT ?human ?humanLabel (group_concat(?givennameLabel;separator=', ') as ?givenNames) | |
WHERE | |
{ | |
?human wdt:P31 wd:Q5 ; | |
wdt:P27 wd:Q32 . | |
?human wdt:P735 ?givenname . | |
FILTER NOT EXISTS { | |
?human wdt:P734 ?familyName | |
} | |
FILTER NOT EXISTS { | |
?human wdt:P97 ?nobility #Excludes nobility from the result set | |
} | |
OPTIONAL { | |
?human schema:isPartOf <https://lb.wikipedia.org/> . | |
} | |
SERVICE wikibase:label { | |
bd:serviceParam wikibase:language "lb,fr,de,en". | |
?human rdfs:label ?humanLabel. | |
?givenname rdfs:label ?givennameLabel. | |
} | |
} | |
GROUP BY ?human ?humanLabel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment