query-94b0eb64731dfb64dcb005e23890a738
religious art (Q2864737)
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?item ?typ
{
?item wdt:P31 wd:Q3305213.
?item wdt:P18 ?img.
OPTIONAL {?item wdt:P136 ?genre.}.
FILTER (!BOUND(?genre)).
{
?item rdfs:label ?nazwa.
FILTER(REGEX(?nazwa, '(jesus)|(virgine)', 'i') || REGEX(?nazwa, '((virgine)|(madonna)) ((and)|(with)) child', 'i'))
BIND('sztuka sakralna' as ?typ)
}
}
ORDER BY ?typ
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?genre")
v4("?img")
v3("?item"):::projected
v5("?nazwa")
v6("?typ"):::projected
c2(["wd:Q3305213"]):::iri
f0[["not bound(?genre)"]]
f0 --> v2
v3 --"wdt:P31"--> c2
v3 --"wdt:P18"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P136".-> v2
end
f1[["(regex(?nazwa,'(jesus)|(virgine)','i') || regex(?nazwa,'((virgine)|(madonna)) ((and)|(with)) child','i'))"]]
f1 --> v5
v3 --"rdfs:label"--> v5
bind2[/"'sztuka sakralna'"/]
bind2 --as--o v6