query-552a839d0838da2571c9d96041b5b852

rq turtle/ttl

Entries of the Dictionary of African Biography I already asked for a similar query, but nevertheless I'm not able to write one. I'm sorry, so I'm asking again for a query that Hi there,and, if possible, links to Wikipedia articles in any language. (P27)country of citizenship and their (P21)sex or gender with their (Q46002746)Dictionary of African Biography in (P1343)described by source lists all humans I would like to use the query for a working list to be updated by the ListeriaBot. Would that be possible? Thank you! 15:19, 4 January 2019 (UTC)) talk (JcorneliusBest regards, --Sure, you came to the right place. Here is one:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?itemDescription
  (GROUP_CONCAT(DISTINCT ?genderLabel) as ?genderLabel)
  (GROUP_CONCAT(DISTINCT ?natLabel; separator=", ") as ?natLabels)
WHERE   
{
    ?item wdt:P1343 wd:Q46002746 ; wdt:P31 wd:Q5  
    OPTIONAL { ?item wdt:P21 ?gender }
    OPTIONAL { ?item wdt:P27 ?nat  }              
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
        ?item rdfs:label ?itemLabel .                           
        ?item schema:description ?itemDescription .
        ?nat rdfs:label ?natLabel .
        ?gender rdfs:label ?genderLabel .                            
                           }
}
GROUP BY ?item ?itemLabel ?itemDescription
ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?gender") v8("?genderLabel"):::projected v2("?item"):::projected v5("?itemDescription"):::projected v1("?itemLabel"):::projected v4("?nat") v6("?natLabel"):::projected v8("?natLabels") c8(["bd:serviceParam"]):::iri c2(["wd:Q46002746"]):::iri c4(["wd:Q5"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P1343"--> c2 v2 --"wdt:P31"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P21".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P27".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 v2 --"rdfs:label"--> v1 v2 --"schema:description"--> v5 v4 --"rdfs:label"--> v6 v3 --"rdfs:label"--> v8 end bind2[/"?genderLabel"/] v8 --o bind2 bind2 --as--o v8 bind3[/"?natLabel"/] v6 --o bind3 bind3 --as--o v8