query-dd65b502025e8ccb8561893572590d9e

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 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/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?label ?dn ?dm ?active WHERE {
  ?item p:P569 ?stdn; p:P570 ?stdm; wdt:P106 ?activity .
  VALUES ?activity { wd:Q175151 wd:Q1229025 wd:Q998550 wd:Q2516866 wd:Q40881196 } .
  ?stdn a wikibase:BestRank ; psv:P569 [ wikibase:timePrecision ?precn ; wikibase:timeValue ?dn ] .
  ?stdm a wikibase:BestRank ; psv:P570 [ wikibase:timePrecision ?precm ; wikibase:timeValue ?dm ] .
  FILTER(?precn IN ("7"^^xsd:integer, "8"^^xsd:integer, "9"^^xsd:integer, "10"^^xsd:integer))
  FILTER(?precm IN ("7"^^xsd:integer, "8"^^xsd:integer, "9"^^xsd:integer, "10"^^xsd:integer))
  BIND ((YEAR(?dm)-YEAR(?dn)) AS ?active) .
  FILTER (YEAR(?dm)<1600) .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "it" . ?item rdfs:label ?label }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?active"):::projected v8("?activity") v1("?dm"):::projected v8("?dn"):::projected v4("?item"):::projected v10("?label"):::projected v2("?precm") v3("?precn") v6("?stdm") v5("?stdn") a1((" ")) a2((" ")) c10(["wikibase:BestRank"]):::iri c18(["it"]):::literal c16(["bd:serviceParam"]):::iri f0[["year-from-dateTime(?dm) < '1600^^xsd:integer'"]] f0 --> v1 list0c1(["7^^xsd:integer"]):::literal list0c2(["8^^xsd:integer"]):::literal list0c3(["9^^xsd:integer"]):::literal list0c4(["10^^xsd:integer"]):::literal list0c1 --o f1 list0c2 --o f1 list0c3 --o f1 list0c4 --o f1 f1[[" in "]] f1 --> v2 list1c1(["7^^xsd:integer"]):::literal list1c2(["8^^xsd:integer"]):::literal list1c3(["9^^xsd:integer"]):::literal list1c4(["10^^xsd:integer"]):::literal list1c1 --o f2 list1c2 --o f2 list1c3 --o f2 list1c4 --o f2 f2[[" in "]] f2 --> v3 v4 --"p:P569"--> v5 v4 --"p:P570"--> v6 v4 --"p:direct/P106"--> v8 bind3[/VALUES ?activity/] bind3-->v8 bind30(["wd:Q175151"]) bind30 --> bind3 bind31(["wd:Q1229025"]) bind31 --> bind3 bind32(["wd:Q998550"]) bind32 --> bind3 bind33(["wd:Q2516866"]) bind33 --> bind3 bind34(["wd:Q40881196"]) bind34 --> bind3 v5 --"a"--> c10 a1 --"wikibase:timePrecision"--> v3 a1 --"wikibase:timeValue"--> v8 v5 --"p:statement/value/P569"--> a1 v6 --"a"--> c10 a2 --"wikibase:timePrecision"--> v2 a2 --"wikibase:timeValue"--> v1 v6 --"p:statement/value/P570"--> a2 bind4[/"year-from-dateTime(?dm) - year-from-dateTime(?dn)"/] v1 --o bind4 v8 --o bind4 bind4 --as--o v9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c16 --"wikibase:language"--> c18 v4 --"rdfs:label"--> v10 end