Last active
March 12, 2017 11:10
-
-
Save edouardhue/b67e44ef3b2b1bdc059b73b929e23888 to your computer and use it in GitHub Desktop.
Voies et lieux-dits de Rennes avec Fantoir
This file contains 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
# Nombre de voies et lieux-dits à Rennes, dont nombre ayant un code Fantoir renseigné | |
SELECT ?natureLabel (COUNT(?lieu) AS ?Nombre) (COUNT(?fantoir) AS ?Fantoir) | |
WHERE { | |
?lieu wdt:P31 ?nature ; | |
wdt:P131 wd:Q647 . # à Rennes | |
{ ?lieu wdt:P31/wdt:P279* wd:Q181307 } # Lieu-dit | |
UNION | |
{ ?lieu wdt:P31/wdt:P279* wd:Q83620 } # Voie de communication | |
OPTIONAL { | |
?lieu wdt:P3182 ?fantoir ; | |
} | |
SERVICE wikibase:label { | |
bd:serviceParam wikibase:language "fr" | |
} | |
} | |
GROUP BY ?natureLabel | |
ORDER BY DESC(?Fantoir) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment