query-f87fd39311c3b8a2a9937602b54d0805

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 bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?female ?femaleLabel ?dob ?birthplaceLabel ?dod ?age ?deathplaceLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?female wdt:P21 wd:Q6581072;             # is female
          wdt:P6379 wd:Q1464509.           # has works in the collection of the NGV
  OPTIONAL { ?female wdt:P569 ?dob. }
  OPTIONAL { ?female wdt:P570 ?dod. }
  OPTIONAL { ?female wdt:P19 ?birthplace. }
  OPTIONAL { ?female wdt:P20 ?deathplace. }
  bind(year(?dod)-year(?dob) as ?age )     # crude calculation of age
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?age"):::projected v4("?birthplace") v5("?deathplace") v2("?dob"):::projected v3("?dod"):::projected v1("?female"):::projected c2(["bd:serviceParam"]):::iri c8(["wd:Q1464509"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal c6(["wd:Q6581072"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"wdt:P21"--> c6 v1 --"wdt:P6379"--> c8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P569".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P570".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P19".-> v4 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P20".-> v5 end bind0[/"year-from-dateTime(?dod) - year-from-dateTime(?dob)"/] v3 --o bind0 v2 --o bind0 bind0 --as--o v6