query: SELECT ?item ?itemLabel ?genderLabel (GROUP_CONCAT(DISTINCT ?occupationLabel; SEPARATOR=", ") AS ?occupations) (GROUP_CONCAT(DISTINCT ?countryLabel; SEPARATOR=", ") AS ?countries) ?death ?articles {
    VALUES ?target_country { wd:Q29} . #countries: Spain. Removing this line to get worldwide may cause a query timeout.
    VALUES ?occ { wd:Q2500638 wd:Q20826540 wd:Q215627 } . #occupation: creator, erudite, person. These 3 occupations will also look for subclasses. Example: Alan Turing is a cryptographer, a subclass of cryptologist, a subclass of mathematician, a subclass of scientist, a subclass of erudite.
     ?item wdt:P31 wd:Q5;
                 wdt:P21 ?gender;
                 wdt:P27 ?target_country;
                 wdt:P27 ?country;
                 wdt:P106/wdt:P279* ?occ ;
                 wdt:P106 ?occupation;
                 wikibase:sitelinks ?articles . #Service to count the number of articles in Wikipedia language versions. The higher the number, the greater the chances that the person is very notorious.
     ?item wdt:P570 ?death . hint:Prior hint:rangeSafe true .
     FILTER( ?death >= "1939-01-01T00:00:00"^^xsd:dateTime && ?death < "1940-01-01T00:00:00"^^xsd:dateTime ) #death: public domain "life+80 years". Change both years to get a list in different legislation. Example for USA: life+70 years
     SERVICE wikibase:label {
         bd:serviceParam wikibase:language "fr,en" . #Service to retrieve the labels of items, in order of language. Example: if the label does not exist in French, the service will take the English label
         ?item rdfs:label ?itemLabel .
         ?gender rdfs:label ?genderLabel .
         ?occupation rdfs:label ?occupationLabel .
         ?country rdfs:label ?countryLabel .
     } .
  } GROUP BY ?item ?itemLabel ?genderLabel ?death ?articles ORDER BY DESC (?articles)