query-76f3a4b0542908e673da2c95b677f8da
17:50, 3 April 2023 (UTC) divudìMi puoi illuminare? : certamente.Divudi85@
Use at
- https://query.wikidata.org/sparql
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 bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT ?number ?coord ?layer
WHERE
{
{
SELECT DISTINCT (COUNT(?workp) as ?number) ?coord
WHERE {
?item wdt:P31 wd:Q5; wdt:P937 ?workp; wdt:P106 ?activity .
?workp wdt:P625 ?coord; wdt:P17 wd:Q38.
values ?activity { wd:Q175151 wd:Q1229025 wd:Q998550 wd:Q2516866 wd:Q40881196 } .
?item wdt:P2031 ?start.
?item wdt:P2032 ?end.
FILTER ("1450"^^xsd:dateTime < ?start).
FILTER ("1500"^^xsd:dateTime > ?end).
}
GROUP BY ?coord
} BIND( IF(?number < 5, "0-4", IF(?number < 10, "5-9", IF(?number < 15, "10-14", IF(?number < 20, "15-19", IF(?number < 25, "20-24","25+"))))) AS ?layer)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
GROUP BY ?number ?coord ?layer
ORDER BY DESC(?number)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?activity")
v7("?coord"):::projected
v2("?end")
v4("?item")
v8("?layer"):::projected
v8("?number"):::projected
v3("?start")
v5("?workp")
c15(["it"]):::literal
c9(["wd:Q38"]):::iri
c13(["bd:serviceParam"]):::iri
c4(["wd:Q5"]):::iri
f0[["'1500^^xsd:dateTime' > ?end"]]
f0 --> v2
f1[["'1450^^xsd:dateTime' < ?start"]]
f1 --> v3
v4 --"wdt:P31"--> c4
v4 --"wdt:P937"--> v5
v4 --"wdt:P106"--> v8
v5 --"wdt:P625"--> v7
v5 --"wdt:P17"--> c9
bind2[/VALUES ?activity/]
bind2-->v8
bind20(["wd:Q175151"])
bind20 --> bind2
bind21(["wd:Q1229025"])
bind21 --> bind2
bind22(["wd:Q998550"])
bind22 --> bind2
bind23(["wd:Q2516866"])
bind23 --> bind2
bind24(["wd:Q40881196"])
bind24 --> bind2
v4 --"wdt:P2031"--> v3
v4 --"wdt:P2032"--> v2
bind4[/"count(?workp)"/]
v5 --o bind4
bind4 --as--o v8
bind5[/"if(?number < '5^^xsd:integer','0-4',if(?number < '10^^xsd:integer','5-9',if(?number < '15^^xsd:integer','10-14',if(?number < '20^^xsd:integer','15-19',if(?number < '25^^xsd:integer','20-24','25+')))))"/]
v8 --o bind5
bind5 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end