query-b0a619a9ff48cbde97b3503bc61cea39

rq turtle/ttl

PropertiesEarly Modern Letters Online person ID (P1802)member of (P463)instance of (P31)subclass of (P279)image (P18)date of birth (P569)date of death (P570)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?birthDate ?birthPrecision ?deathDate ?deathPrecision ?pic ?groupLabel (URI(CONCAT("http://emlo.bodleian.ox.ac.uk/profile/person/", SAMPLE(?emlo))) AS ?emlolink)
WHERE
{ ?item wdt:P1802 ?emlo;
         wdt:P463 ?group.
 { ?group wdt:P31/wdt:P279? wd:Q955824 } UNION { ?group wdt:P31/wdt:P279? wd:Q748019 }
OPTIONAL { ?item wdt:P18 ?pic }

?item p:P569/psv:P569 ?birthDateNode .
?birthDateNode wikibase:timeValue ?birthDate .
?birthDateNode wikibase:timePrecision ?birthPrecision .
OPTIONAL {?item p:P570/psv:P570 ?deathDateNode .
?deathDateNode wikibase:timeValue ?deathDate .
?deathDateNode wikibase:timePrecision ?deathPrecision }

SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"
  }
}  GROUP BY ?item ?itemLabel ?birthDate ?birthPrecision ?deathDate ?deathPrecision ?pic ?groupLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v11("?_anon_42b5416610844a34809f33a099ae9de132332"):::projected v6("?birthDate"):::projected v5("?birthDateNode") v7("?birthPrecision"):::projected v9("?deathDate"):::projected v8("?deathDateNode") v10("?deathPrecision"):::projected v2("?emlo") v12("?emlolink") v3("?group") v1("?item"):::projected v4("?pic"):::projected a1((" ")) a2((" ")) a3((" ")) a4((" ")) c6(["wd:Q748019"]):::iri c15(["bd:serviceParam"]):::iri c4(["wd:Q955824"]):::iri c17(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"p:direct/P1802"--> v2 v1 --"p:direct/P463"--> v3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P31"--> a2 subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; a2 --"p:direct/P279"--> c6 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P31"--> a1 subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; a1 --"p:direct/P279"--> c4 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; end union2r <== or ==> union2l end end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P18".-> v4 end v1 --"p:P569"--> a3 a3 --"p:statement/value/P569"--> v5 v5 --"wikibase:timeValue"--> v6 v5 --"wikibase:timePrecision"--> v7 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:P570".-> a4 a4 --"p:statement/value/P570"--> v8 v8 --"wikibase:timeValue"--> v9 v8 --"wikibase:timePrecision"--> v10 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c15 --"wikibase:language"--> c17 end bind1[/"sample(?emlo)"/] v2 --o bind1 bind1 --as--o v11 bind2[/"concat('http://emlo.bodleian.ox.ac.uk/profile/person/',)"/] null --o bind2 bind2 --as--o v12