query-25c42690b3734dd50d3c059c7e431f72

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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q5 ;
      p:P569/psv:P569 [
        wikibase:timePrecision ?precb ;
         wikibase:timeValue ?birth ;
      ] ;
      p:P570/psv:P570 [
        wikibase:timePrecision ?precd;
        wikibase:timeValue ?death ;
      ] .
    FILTER(?precb >= 9). # precision of at least year
    FILTER(?precd >= 9). # precision of at least year
    FILTER(year(?death) - year(?birth) < 20) #younger than 20 years
    FILTER(year(?birth) < 1500) #lived before 1500
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?birth") v2("?death") v5("?item"):::projected v4("?precb") v3("?precd") a2((" ")) a1((" ")) a4((" ")) a3((" ")) c15(["en"]):::literal c13(["bd:serviceParam"]):::iri c5(["wd:Q5"]):::iri f0[["year-from-dateTime(?birth) < '1500^^xsd:integer'"]] f0 --> v1 f1[["year-from-dateTime(?death) - year-from-dateTime(?birth) < '20^^xsd:integer'"]] f1 --> v2 f1 --> v1 f2[["?precd >= '9^^xsd:integer'"]] f2 --> v3 f3[["?precb >= '9^^xsd:integer'"]] f3 --> v4 v5 --"p:direct/P31"--> c5 a1 --"wikibase:timePrecision"--> v4 a1 --"wikibase:timeValue"--> v1 v5 --"p:P569"--> a2 a2 --"p:statement/value/P569"--> a1 a3 --"wikibase:timePrecision"--> v3 a3 --"wikibase:timeValue"--> v2 v5 --"p:P570"--> a4 a4 --"p:statement/value/P570"--> a3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end