Created
July 14, 2020 05:08
-
-
Save napsternxg/e70326e6b11aec41b6c6e5e11278e051 to your computer and use it in GitHub Desktop.
Wikidata get all subclasses of a given class
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
SELECT ?subClass ?subClassLabel ?desc WHERE { | |
?subClass wdt:P279* wd:Q5. # Here we are getting all subClasses of Human and its subclasses | |
OPTIONAL { | |
?subClass rdfs:label ?desc. | |
FILTER((LANG(?desc)) = "en") | |
} | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment