depicts/templates/query/facet.sparql

12 lines
490 B
SPARQL

select ?property ?object ?objectLabel (count(*) as ?count) {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item wdt:P31 wd:Q3305213 .
?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 .
FILTER NOT EXISTS { ?item wdt:P180 ?depicts }
} group by ?property ?propertyLabel ?object ?objectLabel