query-33e9239fef3949d3c2567dd08a89e265

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?person ?personLabel 
(GROUP_CONCAT( ?_occupation) as ?occupation)
(SAMPLE(?_country) as ?_country)

WHERE {
  ?person wdt:P570 ?death .
  FILTER ( YEAR( ?death ) >= 1927 && YEAR( ?death ) < 1947 ) .
  ?person wdt:P106/wdt:P279* wd:Q483501 . #person with occupation (P106) any subclass(P279) of artist (Q483501)
  OPTIONAL { ?person wdt:P27 ?_country } .
  OPTIONAL { ?person wdt:P106 ?_occupation } .
  OPTIONAL { ?person wdt:P569 ?_date_of_birth } .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}
GROUP BY ?person ?personLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?_country"):::projected v5("?_date_of_birth") v4("?_occupation"):::projected v1("?death") v6("?occupation") v2("?person"):::projected a1((" ")) c10(["bd:serviceParam"]):::iri c6(["wd:Q483501"]):::iri c12(["en"]):::literal f0[["year-from-dateTime(?death) >= '1927^^xsd:integer'year-from-dateTime(?death) < '1947^^xsd:integer'"]] f0 --> v1 v2 --"wdt:P570"--> v1 v2 --"wdt:P106"--> a1 a1 --"wdt:P279"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P27".-> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P106".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P569".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end bind3[/"?_occupation"/] v4 --o bind3 bind3 --as--o v6 bind4[/"sample(?_country)"/] v7 --o bind4 bind4 --as--o v7