Last active
January 6, 2022 02:47
-
-
Save eyssette/93c35602cc994a999cad627ace32e694 to your computer and use it in GitHub Desktop.
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 xsd: <http://www.w3.org/2001/XMLSchema#> | |
PREFIX bd: <http://www.bigdata.com/rdf#> | |
PREFIX wikibase: <http://wikiba.se/ontology#> | |
PREFIX wd: <http://www.wikidata.org/entity/> | |
PREFIX wdt: <http://www.wikidata.org/prop/direct/> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
SELECT DISTINCT ?birthYear ?deathYear ?personLabel_fr ?personLabel_en ?person ?image ?genderLabel ?languageLabel ?sitelinks ?outcoming ?article # ?countryLabel ?continentLabel ?movementLabel ?timePeriodLabel | |
WHERE { | |
?person wdt:P31 wd:Q5 . | |
?person wdt:P106 wd:Q4964182 . | |
?person wikibase:statements ?outcoming . | |
optional{?person rdfs:label ?personLabel_fr filter (lang(?personLabel_fr) = "fr").} | |
optional{?person rdfs:label ?personLabel_en filter (lang(?personLabel_en) = "en").} | |
# optional{?person wdt:P27 ?country. | |
# ?country wdt:P30 ?continent.} | |
?person wdt:P569 ?birth . | |
?person wdt:P570 ?death . | |
?person wikibase:sitelinks ?sitelinks. | |
optional{?person wdt:P18 ?image . } | |
optional{ ?person wdt:P21 ?gender .} | |
optional{ ?person wdt:P1412 ?language .} | |
#optional{ ?person wdt:P135 ?movement .} | |
#optional{ ?person wdt:P2348 ?timePeriod .} | |
OPTIONAL { | |
?article schema:about ?person . | |
?article schema:inLanguage "en" . | |
?article schema:isPartOf <https://en.wikipedia.org/> . | |
} | |
SERVICE wikibase:label { | |
bd:serviceParam wikibase:language "fr, en" . | |
} | |
BIND(YEAR(?birth) as ?birthYear) | |
BIND(YEAR(?death) as ?deathYear) | |
FILTER(BOUND(?birthYear) && BOUND(?deathYear )) | |
} | |
ORDER BY ?birthYear ?deathYear |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment