query-b545f36ad44a6fba0054eb35c27f0f08
title:possibili date di attività importate come date di nascita/morte
SELECT ?tipo ?tipoLabel ?tipoDescription ?dn ?dm ?ntimeprecision WHERE {
?tipo wdt:P106 ?v.
VALUES ?v { wd:Q175151 wd:Q1229025 wd:Q998550 wd:Q2516866 wd:Q40881196 }
?tipo wdt:P569 ?dn; wdt:P570 ?dm. FILTER(((YEAR(?dm)) - (YEAR(?dn))) < 20 )
?tipo (p:P569/psv:P569) ?ntimenode. ?ntimenode wikibase:timePrecision ?ntimeprecision. FILTER(?ntimeprecision = 9 )
?tipo (wdt:P569|wdt:P2031) ?inizio. FILTER((YEAR(?inizio)) > 1400 )
?tipo (wdt:P570|wdt:P2032) ?fine. FILTER((YEAR(?fine)) < 1700 )
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
Use at
- https://query.wikidata.org/sparql
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#>
#title:possibili date di attività importate come date di nascita/morte
SELECT ?tipo ?tipoLabel ?tipoDescription ?dn ?dm ?ntimeprecision WHERE {
?tipo wdt:P106 ?v.
VALUES ?v { wd:Q175151 wd:Q1229025 wd:Q998550 wd:Q2516866 wd:Q40881196 }
?tipo wdt:P569 ?dn; wdt:P570 ?dm. FILTER(((YEAR(?dm)) - (YEAR(?dn))) < 20 )
?tipo (p:P569/psv:P569) ?ntimenode. ?ntimenode wikibase:timePrecision ?ntimeprecision. FILTER(?ntimeprecision = 9 )
?tipo (wdt:P569|wdt:P2031) ?inizio. FILTER((YEAR(?inizio)) > 1400 )
?tipo (wdt:P570|wdt:P2032) ?fine. FILTER((YEAR(?fine)) < 1700 )
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?dm"):::projected
v5("?dn"):::projected
v1("?fine")
v2("?inizio")
v8("?ntimenode")
v3("?ntimeprecision"):::projected
v6("?tipo"):::projected
v8("?v")
a1((" "))
c14(["bd:serviceParam"]):::iri
c16(["it,en"]):::literal
f0[["year-from-dateTime(?fine) < '1700^^xsd:integer'"]]
f0 --> v1
f1[["year-from-dateTime(?inizio) > '1400^^xsd:integer'"]]
f1 --> v2
f2[["?ntimeprecision = '9^^xsd:integer'"]]
f2 --> v3
f3[["year-from-dateTime(?dm) - year-from-dateTime(?dn) < '20^^xsd:integer'"]]
f3 --> v4
f3 --> v5
v6 --"p:direct/P106"--> v8
bind4[/VALUES ?v/]
bind4-->v8
bind40(["wd:Q175151"])
bind40 --> bind4
bind41(["wd:Q1229025"])
bind41 --> bind4
bind42(["wd:Q998550"])
bind42 --> bind4
bind43(["wd:Q2516866"])
bind43 --> bind4
bind44(["wd:Q40881196"])
bind44 --> bind4
v6 --"p:direct/P569"--> v5
v6 --"p:direct/P570"--> v4
v6 --"p:P569"--> a1
a1 --"p:statement/value/P569"--> v8
v8 --"wikibase:timePrecision"--> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v6 --"p:direct/P2031"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v6 --"p:direct/P569"--> v2
end
union0r <== or ==> union0l
end
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v6 --"p:direct/P2032"--> v1
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v6 --"p:direct/P570"--> v1
end
union1r <== or ==> union1l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
end