query-1f9fc65929fa5be8d7afb6ab0886f568

rq turtle/ttl

title:Paintings by Russian artists from around the time of the Russian Revolution SELECT ?work ?workLabel ?artistLabel ?date ?datePrecision ?image WHERE { ?work wdt:P31 wd:Q3305213 # paintings ; wdt:P170 ?artist . ?artist wdt:P27 wd:Q34266. # artist's nationality: Russian Empire ?work p:P571/psv:P571 ?node . ?node wikibase:timeValue ?date ; # date of painting wikibase:timePrecision ?datePrecision # precision of date (e.g. day, month, year) BIND(YEAR(?date) as ?year) FILTER(?year > 1905) FILTER(?year < 1930) #specify date range FILTER (?datePrecision > 8) # known year .?work wdt:P18 ?image # only show art that Commons has an image for SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,ru,et,de,fr". } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Paintings by Russian artists from around the time of the Russian Revolution
SELECT ?work ?workLabel ?artistLabel ?date ?datePrecision ?image WHERE {
  ?work wdt:P31 wd:Q3305213 # paintings
        ; wdt:P170 ?artist .
  ?artist wdt:P27 wd:Q34266. # artist's nationality: Russian Empire
  ?work p:P571/psv:P571 ?node .
  ?node wikibase:timeValue ?date ; # date of painting
   wikibase:timePrecision ?datePrecision # precision of date (e.g. day, month, year)
        BIND(YEAR(?date) as ?year) FILTER(?year > 1905) FILTER(?year < 1930) #specify date range
        FILTER (?datePrecision > 8) # known year
 .?work wdt:P18 ?image # only show art that Commons has an image for
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,ru,et,de,fr". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?artist") v6("?date"):::projected v1("?datePrecision"):::projected v7("?image"):::projected v5("?node") v3("?work"):::projected v7("?year") a1((" ")) c8(["wd:Q34266"]):::iri c5(["wd:Q3305213"]):::iri c15(["bd:serviceParam"]):::iri c17(["#91;AUTO_LANGUAGE#93;,en,ru,et,de,fr"]):::literal f0[["?datePrecision > '8^^xsd:integer'"]] f0 --> v1 f1[["?year < '1930^^xsd:integer'"]] f1 --> v7 f2[["?year > '1905^^xsd:integer'"]] f2 --> v7 v3 --"p:direct/P31"--> c5 v3 --"p:direct/P170"--> v4 v4 --"p:direct/P27"--> c8 v3 --"p:P571"--> a1 a1 --"p:statement/value/P571"--> v5 v5 --"wikibase:timeValue"--> v6 v5 --"wikibase:timePrecision"--> v1 bind3[/"year-from-dateTime(?date)"/] v6 --o bind3 bind3 --as--o v7 v3 --"p:direct/P18"--> v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c15 --"wikibase:language"--> c17 end