query-15d5399efedf381bf782676ebc22c589

rq turtle/ttl

TODO

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
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#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?genderLabel (GROUP_CONCAT(DISTINCT ?occupationLabel; SEPARATOR=", ") AS ?occupations) (GROUP_CONCAT(DISTINCT ?countryLabel; SEPARATOR=", ") AS ?countries) ?death {
   VALUES ?target_country { wd:Q16 wd:Q31 wd:Q39 wd:Q142 } . #countries: Canada, France, Switzerland, Belgium. Remove this line to get worldwide.
  VALUES ?occupation { wd:Q483501 wd:Q36834 wd:Q639669 wd:Q753110 wd:Q488205 wd:Q49757 wd:Q4964182 wd:Q1281618 wd:Q36180 wd:Q482980 wd:Q1028181 wd:Q6625963 wd:Q28389 wd:Q1930187 wd:Q33999 wd:Q3282637 wd:Q81096 wd:Q201788 wd:Q18939491 wd:Q486748 wd:Q3658608 wd:Q214917 wd:Q11774202 wd:Q205375 } . #occupation: composer, poet, sculptor, writer, artist, painter, etc.
   ?item wdt:P31 wd:Q5;
               wdt:P21 ?gender;
               wdt:P27 ?target_country;
               wdt:P27 ?country;
               wdt:P106 ?occupation .
   ?item wdt:P570 ?death . 
   FILTER( ?death >= "1966-01-01T00:00:00"^^xsd:dateTime && ?death < "1967-01-01T00:00:00"^^xsd:dateTime )
   SERVICE wikibase:label {
       bd:serviceParam wikibase:language "fr,en,ru,el,es,fa" .
       ?item rdfs:label ?itemLabel .
       ?gender rdfs:label ?genderLabel .
       ?occupation rdfs:label ?occupationLabel .
       ?country rdfs:label ?countryLabel .
   } .
} GROUP BY ?item ?itemLabel ?genderLabel ?death ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v12("?countries") v7("?country") v10("?countryLabel"):::projected v2("?death"):::projected v6("?gender") v8("?genderLabel"):::projected v5("?item"):::projected v1("?itemLabel"):::projected v4("?occupation") v9("?occupationLabel"):::projected v11("?occupations") v3("?target_country") c12(["fr,en,ru,el,es,fa"]):::literal c10(["bd:serviceParam"]):::iri c4(["wd:Q5"]):::iri f0[["?death >= '1966-01-01T00:00:00^^xsd:dateTime'?death < '1967-01-01T00:00:00^^xsd:dateTime'"]] f0 --> v2 bind1[/VALUES ?target_country/] bind1-->v3 bind10(["wd:Q16"]) bind10 --> bind1 bind11(["wd:Q31"]) bind11 --> bind1 bind12(["wd:Q39"]) bind12 --> bind1 bind13(["wd:Q142"]) bind13 --> bind1 bind2[/VALUES ?occupation/] bind2-->v4 bind20(["wd:Q483501"]) bind20 --> bind2 bind21(["wd:Q36834"]) bind21 --> bind2 bind22(["wd:Q639669"]) bind22 --> bind2 bind23(["wd:Q753110"]) bind23 --> bind2 bind24(["wd:Q488205"]) bind24 --> bind2 bind25(["wd:Q49757"]) bind25 --> bind2 bind26(["wd:Q4964182"]) bind26 --> bind2 bind27(["wd:Q1281618"]) bind27 --> bind2 bind28(["wd:Q36180"]) bind28 --> bind2 bind29(["wd:Q482980"]) bind29 --> bind2 bind210(["wd:Q1028181"]) bind210 --> bind2 bind211(["wd:Q6625963"]) bind211 --> bind2 bind212(["wd:Q28389"]) bind212 --> bind2 bind213(["wd:Q1930187"]) bind213 --> bind2 bind214(["wd:Q33999"]) bind214 --> bind2 bind215(["wd:Q3282637"]) bind215 --> bind2 bind216(["wd:Q81096"]) bind216 --> bind2 bind217(["wd:Q201788"]) bind217 --> bind2 bind218(["wd:Q18939491"]) bind218 --> bind2 bind219(["wd:Q486748"]) bind219 --> bind2 bind220(["wd:Q3658608"]) bind220 --> bind2 bind221(["wd:Q214917"]) bind221 --> bind2 bind222(["wd:Q11774202"]) bind222 --> bind2 bind223(["wd:Q205375"]) bind223 --> bind2 v5 --"wdt:P31"--> c4 v5 --"wdt:P21"--> v6 v5 --"wdt:P27"--> v3 v5 --"wdt:P27"--> v7 v5 --"wdt:P106"--> v4 v5 --"wdt:P570"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 v5 --"rdfs:label"--> v1 v6 --"rdfs:label"--> v8 v4 --"rdfs:label"--> v9 v7 --"rdfs:label"--> v10 end bind5[/"?occupationLabel"/] v9 --o bind5 bind5 --as--o v11 bind6[/"?countryLabel"/] v10 --o bind6 bind6 --as--o v12