depicts/templates/query/facet.sparql

12 lines
492 B
SPARQL
Raw Normal View History

2019-10-09 14:38:10 +01:00
select ?property ?object ?objectLabel (count(*) as ?count) {
2019-11-27 12:42:07 +00:00
service wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
2019-11-27 12:45:33 +00:00
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 %}
2019-11-27 12:42:07 +00:00
?item wdt:{{pid}} wd:{{qid}} .
2019-10-09 14:38:10 +01:00
{% endfor %}
2019-11-27 12:42:07 +00:00
filter (strstarts(str(?property), "http://www.wikidata.org/prop/direct/P") )
2019-10-09 14:38:10 +01:00
?item ?property ?object .
2019-12-17 11:44:53 +00:00
} group by ?property ?object ?objectLabel