depicts/templates/query/property.sparql

18 lines
501 B
SPARQL

select ?object ?objectLabel ?objectDescription (count(*) as ?count) {
values ?isa { {% for isa in isa_list %} wd:{{ isa }} {% endfor %} }
?item wdt:P31 ?isa .
?item wdt:P18 ?image .
?item wdt:{{ pid }} ?object .
optional {
?object rdfs:label ?objectLabel.
FILTER(LANG(?objectLabel) = "en").
}
optional {
?object schema:description ?objectDescription .
filter(lang(?objectDescription) = "en")
}
} group by ?object ?objectLabel ?objectDescription
order by desc(?count)