query-aa3b8856e3781ebfc3d366add2826b9e

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (group_concat(distinct ?occupationLabel;separator=", ") as ?occlabel) ?dateofbirth ?dateofdeath  (URI(CONCAT("https://www.animenewsnetwork.com/encyclopedia/people.php?id=",?ANNid)) AS ?ANN)
WHERE {
  ?item wdt:P31 wd:Q5 .
  ?item wdt:P21 wd:Q6581072 .
  ?item wdt:P1982 ?ANNid .
  { ?item wdt:P106 wd:Q3455803 } UNION { ?item wdt:P106 wd:Q2059704 } UNION { ?item wdt:P106 wd:Q11284414 } UNION { ?item wdt:P106 wd:Q2526255 }
  ?item wdt:P106 ?occupation
  OPTIONAL { ?item wdt:P569 ?dateofbirth . }
  OPTIONAL { ?item wdt:P570 ?dateofdeath . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,ja" .
                         ?occupation rdfs:label ?occupationLabel .
                         ?item rdfs:label ?itemLabel .}
} group by ?item ?itemLabel ?dateofbirth ?dateofdeath ?ANNid

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?ANN") v2("?ANNid"):::projected v4("?dateofbirth"):::projected v5("?dateofdeath"):::projected v1("?item"):::projected v7("?itemLabel"):::projected v8("?occlabel") v3("?occupation") v6("?occupationLabel"):::projected c4(["wd:Q6581072"]):::iri c14(["bd:serviceParam"]):::iri c8(["wd:Q2059704"]):::iri c10(["wd:Q2526255"]):::iri c2(["wd:Q5"]):::iri c16(["en,ja"]):::literal c7(["wd:Q3455803"]):::iri c9(["wd:Q11284414"]):::iri v1 --"wdt:P31"--> c2 v1 --"wdt:P21"--> c4 v1 --"wdt:P1982"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P106"--> c10 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P106"--> c9 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P106"--> c8 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P106"--> c7 end union0r <== or ==> union0l end v1 --"wdt:P106"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P569".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P570".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 v3 --"rdfs:label"--> v6 v1 --"rdfs:label"--> v7 end bind1[/"?occupationLabel"/] v6 --o bind1 bind1 --as--o v8 bind2[/"concat('https://www.animenewsnetwork.com/encyclopedia/people.php?id=',?ANNid)"/] v2 --o bind2 bind2 --as--o v9