Skip to content

Instantly share code, notes, and snippets.

@mommi84
Last active July 30, 2020 18:45
Show Gist options
  • Save mommi84/3871cac6015c6dbca7da170546f3dd57 to your computer and use it in GitHub Desktop.
Save mommi84/3871cac6015c6dbca7da170546f3dd57 to your computer and use it in GitHub Desktop.
Predict range of property among datatypes and high-level classes.
select ?x (count(*) as ?c) {
[] <PROPERTY_URI> ?o .
optional {
?o a/rdfs:subClassOf+ ?class .
?class rdfs:subClassOf owl:Thing
}
bind(if(
isuri(?o),
?class,
datatype(?o)
) as ?x)
}
group by ?x
order by desc(?c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment