query-fcaa1aeee98aa70fb05e21b4fa0eca58

rq turtle/ttl

ISNI - GROUP and COUNTBelow ISNI are grouped, maximum found is two. But COUNT gives higher numbers, even for single-ISNI-items e.g. Carl Christian Schiemann 0000000118918926 8Q21607917 Emil Bretschneider 0000000110264673,0000000083454614 8Q551845

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 ?human ?humanLabel ?sl
(GROUP_CONCAT(DISTINCT ?dateOfBirth) AS ?dateOfBirths)
(GROUP_CONCAT(DISTINCT ?dateOfDeath) AS ?dateOfDeaths)
(GROUP_CONCAT(DISTINCT ?bblid) AS ?bblids) 
(GROUP_CONCAT(DISTINCT (replace(?isni, " ", "")); SEPARATOR = ",") AS ?isnis)
(GROUP_CONCAT(DISTINCT ?viaf) AS ?viafs) 
(GROUP_CONCAT(DISTINCT ?gnd) AS ?gnds) 
(GROUP_CONCAT(DISTINCT ?geni) AS ?genis)
(COUNT(?isni) AS ?isniCount)
WHERE {
    ?human wdt:P31 wd:Q5 .      
    ?human wdt:P2580 ?bblid .
    ?human wikibase:sitelinks ?sl.
    OPTIONAL{?human wdt:P569 ?dateOfBirth .}
    OPTIONAL{?human wdt:P570 ?dateOfDeath .}
    {?human wdt:P213 ?isni .}
    OPTIONAL{?human wdt:P214 ?viaf .}
    optional{?human wdt:P227 ?gnd .}
    OPTIONAL{?human wdt:P2600 ?geni .}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
GROUP BY ?human ?humanLabel ?sl
ORDER BY DESC(?isniCount) DESC(?sl) ?dateOfBirths ?dateOfDeaths

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?bblid"):::projected v13("?bblids") v7("?dateOfBirth"):::projected v13("?dateOfBirths") v8("?dateOfDeath"):::projected v13("?dateOfDeaths") v12("?geni"):::projected v17("?genis") v11("?gnd"):::projected v16("?gnds") v5("?human"):::projected v9("?isni"):::projected v18("?isniCount") v14("?isnis") v2("?sl"):::projected v10("?viaf"):::projected v15("?viafs") c12(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal v5 --"wdt:P31"--> c2 v5 --"wdt:P2580"--> v6 v5 --"wikibase:sitelinks"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P569".-> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P570".-> v8 end v5 --"wdt:P213"--> v9 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P214".-> v10 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P227".-> v11 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P2600".-> v12 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end bind8[/"?dateOfBirth"/] v7 --o bind8 bind8 --as--o v13 bind9[/"?dateOfDeath"/] v8 --o bind9 bind9 --as--o v13 bind10[/"?bblid"/] v6 --o bind10 bind10 --as--o v13 bind11[/"replace(?isni,' ','')"/] v9 --o bind11 bind11 --as--o v14 bind12[/"?viaf"/] v10 --o bind12 bind12 --as--o v15 bind13[/"?gnd"/] v11 --o bind13 bind13 --as--o v16 bind14[/"?geni"/] v12 --o bind14 bind14 --as--o v17 bind15[/"count(?isni)"/] v9 --o bind15 bind15 --as--o v18