depicts/templates/query/facet.sparql

12 lines
505 B
SPARQL
Raw Normal View History

2019-10-09 14:38:10 +01:00
select ?property ?object ?objectLabel (count(*) as ?count) {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
VALUES ?isa { {% for isa in isa_list %} wd:{{ isa }} {% endfor %} }
?item wdt:P31 ?isa .
2019-10-09 14:38:10 +01:00
?item wdt:P18 ?image .
{% for pid, qid in params %}
?item wdt:{{pid}} wd:{{qid}} .
{% endfor %}
values ?property { {% for pid in properties %} wdt:{{pid}}{% endfor %} }
?item ?property ?object .
} group by ?property ?propertyLabel ?object ?objectLabel