query-53483205731472a7da908a8e8eec0a2b

rq turtle/ttl

TODO

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?s ?desc ?dob WHERE {
  ?s wdt:P31 wd:Q5.
#  ?s wdt:P569 ?birth.
  ?s  p:P569/psv:P569 [wikibase:timePrecision ?precision; wikibase:timeValue ?birth]
  bind(if(?precision=11,?birth,if(?precision=10,concat(month(?birth)," ",year(?birth)),year(?birth))) as ?dob)                
  ?s wdt:P19 ?place.
  ?place (wdt:P131*/wdt:P706*) wd:Q5705.
  MINUS { ?s wdt:P570 _:b5. }
  ?s rdfs:label ?desc.
  ?article schema:about ?s.
  ?article schema:inLanguage "ca".
  FILTER((?birth > "1898-01-01"^^xsd:dat) && (?birth < "1918-01-01"^^xsd:dat))
  FILTER((LANG(?desc)) = "ca")
}
GROUP BY ?s ?desc ?dob 
LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?article") v2("?birth") v1("?desc"):::projected v5("?dob"):::projected v6("?place") v4("?precision") v3("?s"):::projected a4((" ")) a2((" ")) a1((" ")) a3((" ")) c13(["wd:Q5705"]):::iri c5(["wd:Q5"]):::iri c1(["ca"]):::literal f0[["?desc = 'ca'"]] f0 --> v1 f1[["?birth > s1898-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'?birth < s1918-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f1 --> v2 v3 --"p:direct/P31"--> c5 a1 --"wikibase:timePrecision"--> v4 a1 --"wikibase:timeValue"--> v2 v3 --"p:P569"--> a2 a2 --"p:statement/value/P569"--> a1 bind2[/"if(?precision = '11^^xsd:integer',?birth,if(?precision = '10^^xsd:integer',concat(month-from-dateTime(?birth),' ',year-from-dateTime(?birth)),year-from-dateTime(?birth)))"/] v4 --o bind2 v2 --o bind2 bind2 --as--o v5 v3 --"p:direct/P19"--> v6 v6 --"p:direct/P131"--> a3 a3 --"p:direct/P706"--> c13 subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v3 --"p:direct/P570"--> a4 end v3 --"rdfs:label"--> v1 v7 --"schema:about"--> v3 v7 --"schema:inLanguage"--> c1