Skip to content

Instantly share code, notes, and snippets.

@edouardhue
Last active March 21, 2017 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edouardhue/5bf713b7d0e7771ac312fc49e7e182b2 to your computer and use it in GitHub Desktop.
Save edouardhue/5bf713b7d0e7771ac312fc49e7e182b2 to your computer and use it in GitHub Desktop.
Candidates pour odonymes rennais
# Candidates pour odonymes rennais
SELECT ?person ?personLabel (GROUP_CONCAT(DISTINCT ?femOccupation; SEPARATOR = ', ') AS ?occupation)
WHERE {
{
{ ?person wdt:P19 wd:Q647 } # nées à Rennes
UNION # ou
{ ?person wdt:P20 wd:Q647 } # ayant vécu à Rennes
UNION # ou
{ ?person wdt:P551 wd:Q647 } # mortes à Rennes
} # et
?person wdt:P21 wd:Q6581072 ; # de sexe féminin
wdt:P570 [] . # décédées
FILTER NOT EXISTS { # pour lesquelles il n'existe pas
?ref wdt:P138 ?person ; # quelque chose nommé en référence à cette personne
wdt:P131 wd:Q647 . # qui se trouverait à Rennes
}
OPTIONAL {
?person wdt:P106 ?occupation .
?occupation wdt:P2521 ?femOccupation .
FILTER(LANG(?femOccupation) = "fr") .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "fr" .
?person rdfs:label ?personLabel .
}
}
GROUP BY ?person ?personLabel ?image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment