Move three more queries into templates.
This commit is contained in:
parent
a5dfbd040a
commit
b697be2306
4 changed files with 35 additions and 45 deletions
7
templates/query/find_more_basic.sparql
Normal file
7
templates/query/find_more_basic.sparql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
select distinct ?item ?image {
|
||||
values ?value { {% for qid in qid_list %} wd:{{ qid }}{% endfor %} }
|
||||
?item wdt:P31 wd:Q3305213 .
|
||||
?item wdt:{{ pid }} ?value .
|
||||
?item wdt:P18 ?image .
|
||||
filter not exists { ?item wdt:P180 ?depicts }
|
||||
} limit {{ limit }}
|
||||
5
templates/query/painting_no_depicts.sparql
Normal file
5
templates/query/painting_no_depicts.sparql
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
select distinct ?item where {
|
||||
?item wdt:P31 wd:Q3305213 .
|
||||
?item wdt:P18 ?image .
|
||||
filter not exists { ?item wdt:P180 ?depicts }
|
||||
}
|
||||
16
templates/query/property.sparql
Normal file
16
templates/query/property.sparql
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
select ?object ?objectLabel ?objectDescription (count(*) as ?count) {
|
||||
?item wdt:P31 wd:Q3305213 .
|
||||
?item wdt:P18 ?image .
|
||||
?item wdt:{{ pid }} ?object .
|
||||
filter not exists { ?item wdt:P180 ?depicts }
|
||||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue